pub enum Source {
Path(PathBuf),
Url(Url),
Name(String),
}Expand description
A Source represents the source of content (images, audio, video, etc.).
This type distinguishes between filesystem paths, URLs, and simple names (like icon names).
Variants§
Path(PathBuf)
A filesystem path
Url(Url)
A URL
Name(String)
A simple name (used for example in menu macros or icon names)
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Source
impl<'de> Deserialize<'de> for Source
Source§fn deserialize<D>(deserializer: D) -> Result<Source, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Source, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Source
Auto Trait Implementations§
impl Freeze for Source
impl RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnwindSafe for Source
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