pub struct Icon {
pub src: String,
pub mime_type: Option<String>,
pub sizes: Option<Vec<String>>,
pub theme: Option<IconTheme>,
}Expand description
An optionally-sized icon that can be displayed in a user interface.
Fields§
§src: StringA standard URI pointing to an icon resource.
May be an HTTP/HTTPS URL or a data: URI with Base64-encoded image data.
mime_type: Option<String>Optional MIME type override if the source MIME type is missing or generic.
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.
theme: Option<IconTheme>Optional specifier for the theme this icon is designed for.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Icon
impl<'de> Deserialize<'de> for Icon
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Icon
impl RefUnwindSafe for Icon
impl Send for Icon
impl Sync for Icon
impl Unpin for Icon
impl UnwindSafe for Icon
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more