pub enum ImageSource<'a> {
Url(Cow<'a, str>),
File1 {
file: Cow<'a, str>,
},
File2 {
page: Cow<'a, str>,
file: Cow<'a, str>,
},
File3 {
site: Cow<'a, str>,
page: Cow<'a, str>,
file: Cow<'a, str>,
},
}
Variants§
Url(Cow<'a, str>)
Image is sourced from an arbitrary URL.
File1
Image is attached the current page.
File2
Image is attached to another page on the site.
File3
Image is attached to another page on another site.
Implementations§
Source§impl<'t> ImageSource<'t>
impl<'t> ImageSource<'t>
Trait Implementations§
Source§impl<'a> Clone for ImageSource<'a>
impl<'a> Clone for ImageSource<'a>
Source§fn clone(&self) -> ImageSource<'a>
fn clone(&self) -> ImageSource<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for ImageSource<'a>
impl<'a> Debug for ImageSource<'a>
Source§impl<'de, 'a> Deserialize<'de> for ImageSource<'a>
impl<'de, 'a> Deserialize<'de> for ImageSource<'a>
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
Source§impl<'a, '_derivative_strum> From<&'_derivative_strum ImageSource<'a>> for &'static str
impl<'a, '_derivative_strum> From<&'_derivative_strum ImageSource<'a>> for &'static str
Source§fn from(x: &'_derivative_strum ImageSource<'a>) -> &'static str
fn from(x: &'_derivative_strum ImageSource<'a>) -> &'static str
Converts to this type from the input type.
Source§impl<'a> From<ImageSource<'a>> for &'static str
impl<'a> From<ImageSource<'a>> for &'static str
Source§fn from(x: ImageSource<'a>) -> &'static str
fn from(x: ImageSource<'a>) -> &'static str
Converts to this type from the input type.
Source§impl<'a> Hash for ImageSource<'a>
impl<'a> Hash for ImageSource<'a>
Source§impl<'a> PartialEq for ImageSource<'a>
impl<'a> PartialEq for ImageSource<'a>
Source§impl<'a> Serialize for ImageSource<'a>
impl<'a> Serialize for ImageSource<'a>
impl<'a> Eq for ImageSource<'a>
impl<'a> StructuralPartialEq for ImageSource<'a>
Auto Trait Implementations§
impl<'a> Freeze for ImageSource<'a>
impl<'a> RefUnwindSafe for ImageSource<'a>
impl<'a> Send for ImageSource<'a>
impl<'a> Sync for ImageSource<'a>
impl<'a> Unpin for ImageSource<'a>
impl<'a> UnwindSafe for ImageSource<'a>
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> CallHasher for T
impl<T> CallHasher for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more