Struct freya::components::NetworkImageProps
pub struct NetworkImageProps<'a> {
pub url: Url,
pub fallback: Option<Option<VNode<'a>>>,
pub loading: Option<Option<VNode<'a>>>,
pub width: String,
pub height: String,
pub alt: Option<String>,
}
Expand description
NetworkImage
component properties.
Fields§
§url: Url
URL of the image
fallback: Option<Option<VNode<'a>>>
Fallback element
loading: Option<Option<VNode<'a>>>
Loading element
width: String
Width of image, default is 100%
height: String
Height of image, default is 100%
alt: Option<String>
Information about the image.
Implementations§
§impl<'a> NetworkImageProps<'a>
impl<'a> NetworkImageProps<'a>
pub 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§
§impl<'a> Properties for NetworkImageProps<'a>
impl<'a> Properties for NetworkImageProps<'a>
§type Builder = NetworkImagePropsBuilder<'a, ((), (), (), (), (), ())>
type Builder = NetworkImagePropsBuilder<'a, ((), (), (), (), (), ())>
The type of the builder for this component.
Used to create “in-progress” versions of the props.
§fn builder() -> <NetworkImageProps<'a> as Properties>::Builder
fn builder() -> <NetworkImageProps<'a> as Properties>::Builder
Create a builder for this component.
§unsafe fn memoize(&self, other: &NetworkImageProps<'a>) -> bool
unsafe fn memoize(&self, other: &NetworkImageProps<'a>) -> bool
Memoization can only happen if the props are valid for the ’static lifetime Read more
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§
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