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

source§

fn clone(&self) -> ImageProps

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl PartialEq for ImageProps

source§

fn eq(&self, other: &ImageProps) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Properties for ImageProps

§

type Builder = ImagePropsBuilder

Builder that will be used to construct properties
source§

fn builder() -> Self::Builder

Entrypoint for building properties
source§

impl StructuralPartialEq for ImageProps

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoPropValue<Option<T>> for T

source§

fn into_prop_value(self) -> Option<T>

Convert self to a value of a Properties struct.
source§

impl<T> IntoPropValue<T> for T

source§

fn into_prop_value(self) -> T

Convert self to a value of a Properties struct.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
source§

impl<T> HasAllProps<(), T> for T