Struct freya_components::NetworkImageProps
source · pub struct NetworkImageProps<'a> {
pub url: Url,
pub fallback: Option<Element<'a>>,
pub loading: Option<Element<'a>>,
pub width: String,
pub height: String,
pub alt: Option<String>,
}Expand description
NetworkImage component properties.
Fields§
§url: UrlURL of the image
fallback: Option<Element<'a>>Fallback element
loading: Option<Element<'a>>Loading element
width: StringWidth of image, default is 100%
height: StringHeight of image, default is 100%
alt: Option<String>Information about the image.
Implementations§
source§impl<'a> NetworkImageProps<'a>
impl<'a> NetworkImageProps<'a>
sourcepub fn builder() -> NetworkImagePropsBuilder<'a, ((), (), (), (), (), ())>
pub fn builder() -> NetworkImagePropsBuilder<'a, ((), (), (), (), (), ())>
Create a builder for building NetworkImageProps.
On the builder, call .url(...), .fallback(...)(optional), .loading(...)(optional), .width(...)(optional), .height(...)(optional), .alt(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of NetworkImageProps.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for NetworkImageProps<'a>
impl<'a> !Send for NetworkImageProps<'a>
impl<'a> !Sync for NetworkImageProps<'a>
impl<'a> Unpin for NetworkImageProps<'a>
impl<'a> !UnwindSafe for NetworkImageProps<'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