Struct next_rs::image::ImageProps
source · pub struct ImageProps {Show 19 fields
pub src: &'static str,
pub alt: &'static str,
pub width: &'static str,
pub height: &'static str,
pub style: &'static str,
pub class: &'static str,
pub sizes: &'static str,
pub quality: &'static str,
pub priority: bool,
pub placeholder: &'static str,
pub on_loading_complete: Callback<()>,
pub object_fit: &'static str,
pub object_position: &'static str,
pub on_error: Callback<String>,
pub decoding: &'static str,
pub blur_data_url: &'static str,
pub lazy_boundary: &'static str,
pub unoptimized: bool,
pub node_ref: NodeRef,
}
Expand description
Properties for the Image component.
Fields§
§src: &'static str
The source URL for the image.
alt: &'static str
The alternative text for the image.
width: &'static str
The width of the image.
height: &'static str
The height of the image.
style: &'static str
The style attribute for the image.
class: &'static str
The CSS class for the image.
sizes: &'static str
The sizes attribute for the image.
quality: &'static str
The quality attribute for the image.
priority: bool
Indicates if the image should have priority loading.
placeholder: &'static str
The placeholder attribute for the image.
on_loading_complete: Callback<()>
Callback function for handling loading completion.
object_fit: &'static str
The object-fit attribute for the image.
object_position: &'static str
The object-position attribute for the image.
on_error: Callback<String>
Callback function for handling errors during image loading.
decoding: &'static str
The decoding attribute for the image.
blur_data_url: &'static str
The blur data URL for placeholder image.
lazy_boundary: &'static str
The lazy boundary for lazy loading.
unoptimized: bool
Indicates if the image should be unoptimized.
node_ref: NodeRef
Reference to the DOM node.
Trait Implementations§
source§impl Clone for ImageProps
impl Clone for ImageProps
source§fn clone(&self) -> ImageProps
fn clone(&self) -> ImageProps
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 PartialEq for ImageProps
impl PartialEq for ImageProps
source§fn eq(&self, other: &ImageProps) -> bool
fn eq(&self, other: &ImageProps) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Properties for ImageProps
impl Properties for ImageProps
impl StructuralPartialEq for ImageProps
Auto Trait Implementations§
impl !RefUnwindSafe for ImageProps
impl !Send for ImageProps
impl !Sync for ImageProps
impl Unpin for ImageProps
impl !UnwindSafe for ImageProps
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
§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> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self
to a value of a Properties
struct.source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self
to a value of a Properties
struct.