Struct freya_components::NetworkImageProps
source · pub struct NetworkImageProps {
pub width: String,
pub height: String,
pub min_width: Option<String>,
pub min_height: Option<String>,
pub url: ReadOnlySignal<Url>,
pub fallback: Option<Element>,
pub loading: Option<Element>,
pub alt: Option<String>,
pub aspect_ratio: Option<String>,
pub cover: Option<String>,
pub sampling: Option<String>,
}
Expand description
Properties for the NetworkImage
component.
Fields§
§width: String
Width of the image container. Default to auto
.
height: String
Height of the image container. Default to auto
.
min_width: Option<String>
Min width of the image container.
min_height: Option<String>
Min height of the image container.
url: ReadOnlySignal<Url>
URL of the image.
fallback: Option<Element>
Fallback element.
loading: Option<Element>
Loading element.
alt: Option<String>
Information about the image.
aspect_ratio: Option<String>
Aspect ratio of the image.
cover: Option<String>
Cover of the image.
sampling: Option<String>
Image sampling algorithm.
Implementations§
source§impl NetworkImageProps
impl NetworkImageProps
sourcepub fn builder() -> NetworkImagePropsBuilder<((), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> NetworkImagePropsBuilder<((), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building NetworkImageProps
.
On the builder, call .width(...)
(optional), .height(...)
(optional), .min_width(...)
(optional), .min_height(...)
(optional), .url(...)
, .fallback(...)
(optional), .loading(...)
(optional), .alt(...)
(optional), .aspect_ratio(...)
(optional), .cover(...)
(optional), .sampling(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of NetworkImageProps
.
Trait Implementations§
source§impl Clone for NetworkImageProps
impl Clone for NetworkImageProps
source§fn clone(&self) -> NetworkImageProps
fn clone(&self) -> NetworkImageProps
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl PartialEq for NetworkImageProps
impl PartialEq for NetworkImageProps
source§impl Properties for NetworkImagePropswhere
Self: Clone,
impl Properties for NetworkImagePropswhere
Self: Clone,
source§type Builder = NetworkImagePropsBuilder<((), (), (), (), (), (), (), (), (), (), ())>
type Builder = NetworkImagePropsBuilder<((), (), (), (), (), (), (), (), (), (), ())>
source§fn memoize(&mut self, new: &Self) -> bool
fn memoize(&mut self, new: &Self) -> bool
§fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
impl StructuralPartialEq for NetworkImageProps
Auto Trait Implementations§
impl !Freeze for NetworkImageProps
impl !RefUnwindSafe for NetworkImageProps
impl !Send for NetworkImageProps
impl !Sync for NetworkImageProps
impl Unpin for NetworkImageProps
impl !UnwindSafe for NetworkImageProps
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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