pub enum Icon {
Stock(String),
Cached {
path: PathBuf,
width: Option<u32>,
height: Option<u32>,
},
Remote {
url: Url,
width: Option<u32>,
height: Option<u32>,
},
Local {
path: PathBuf,
width: Option<u32>,
height: Option<u32>,
},
}Expand description
Defines a component icon. See <icon/>.
Variants§
Stock(String)
Icon loaded from the stock.
Cached
Icon cached.
Fields
Remote
Icon loaded from a remote URL.
Fields
Local
Icon loaded from a file.
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
impl StructuralPartialEq for Icon
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