Enum ftml::tree::ImageSource
source · 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 copy 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<ImageSource<'a>> for ImageSource<'a>
impl<'a> PartialEq<ImageSource<'a>> for ImageSource<'a>
source§fn eq(&self, other: &ImageSource<'a>) -> bool
fn eq(&self, other: &ImageSource<'a>) -> bool
source§impl<'a> Serialize for ImageSource<'a>
impl<'a> Serialize for ImageSource<'a>
impl<'a> Eq for ImageSource<'a>
impl<'a> StructuralEq for ImageSource<'a>
impl<'a> StructuralPartialEq for ImageSource<'a>
Auto Trait Implementations§
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§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§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.
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer