One displayable value in several formats: MIME type to data, richest first. Text formats (text/plain, text/html, image/svg+xml, base64 image/png) are strings; +json formats are JSON objects, as Jupyter's display protocol and nbformat store them.
More...
#include <mime_bundle.hpp>
One displayable value in several formats: MIME type to data, richest first. Text formats (text/plain, text/html, image/svg+xml, base64 image/png) are strings; +json formats are JSON objects, as Jupyter's display protocol and nbformat store them.
◆ add()
| void pulsatrix::MimeBundle::add |
( |
std::string |
mime, |
|
|
JsonValue |
data |
|
) |
| |
- Exceptions
-
| std::invalid_argument | if mime is already present. |
◆ find()
| const JsonValue * pulsatrix::MimeBundle::find |
( |
std::string_view |
mime | ) |
const |
The data for mime, or nullptr.
◆ to_json_value()
| JsonValue pulsatrix::MimeBundle::to_json_value |
( |
| ) |
const |
The bundle as one JSON object, {"text/plain": ..., ...}.
◆ entries
| std::vector<std::pair<std::string, JsonValue> > pulsatrix::MimeBundle::entries |
The documentation for this struct was generated from the following file: