pub struct Icon {
pub src: Uri,
pub content_type: Option<String>,
pub sizes: Option<Vec<String>>,
pub theme: Option<String>,
}Expand description
An optionally-sized icon that can be displayed in a user interface.
Fields§
§src: UriA standard URI pointing to an icon resource. May be an HTTP/HTTPS URL or a
data: URI with Base64-encoded image data.
Consumers SHOULD take steps to ensure URLs serving icons are from the same domain as the client/server or a trusted domain.
Consumers SHOULD take appropriate precautions when consuming SVGs as they can contain executable JavaScript.
content_type: Option<String>Optional MIME type override if the source MIME type is missing or generic.
For example: "image/png", "image/jpeg", or "image/svg+xml".
sizes: Option<Vec<String>>Optional array of strings that specify sizes at which the icon can be used.
Each string should be in WxH format (e.g., "48x48", "96x96") or "any" for scalable formats like SVG.
If not provided, the client should assume that the icon can be used at any size.
theme: Option<String>Optional specifier for the theme this icon is designed for. "light" indicates
the icon is designed to be used with a light background, and "dark" indicates
the icon is designed to be used with a dark background.
If not provided, the client should assume the icon can be used with any theme.