Tiny container struct for web resources.
More...
#include <mostlyharmless_WebviewBase.h>
Tiny container struct for web resources.
If serving from RAM, your editor should hold an internal map of route:Resource
, populated in your constructor.
MIME types can be retrieved with mostly_harmless::gui::getMimeType().
◆ Resource() [1/2]
mostly_harmless::gui::WebviewBase::Resource::Resource |
( |
| ) |
|
|
default |
◆ Resource() [2/2]
mostly_harmless::gui::WebviewBase::Resource::Resource |
( |
std::string_view | content, |
|
|
std::string | mimeType_ ) |
Constructs a Resource from a char[] and a mime type.
- Parameters
-
content | A char[] containing the data for this resource. |
mimeType_ | The associated MIME type for this resource. |
◆ data
std::vector<std::uint8_t> mostly_harmless::gui::WebviewBase::Resource::data |
The binary data for this resource.
◆ mimeType
std::string mostly_harmless::gui::WebviewBase::Resource::mimeType |
The associated MIME type for this resource.
The documentation for this struct was generated from the following file: