Struct ImageProps

Source
pub struct ImageProps {
Show 28 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 layout: &'static str, pub node_ref: NodeRef, pub aria_current: &'static str, pub aria_describedby: &'static str, pub aria_expanded: &'static str, pub aria_hidden: &'static str, pub aria_live: &'static str, pub aria_pressed: &'static str, pub aria_controls: &'static str, pub aria_labelledby: &'static str,
}
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.

§layout: &'static str

Image layout.

§node_ref: NodeRef

Reference to the DOM node.

§aria_current: &'static str

Indicates the current state of the image in a navigation menu. Valid values: “page”, “step”, “location”, “date”, “time”, “true”, “false”.

§aria_describedby: &'static str

Describes the image using the ID of the element that provides a description.

§aria_expanded: &'static str

Indicates whether the content associated with the image is currently expanded or collapsed. Valid values: “true”, “false”.

§aria_hidden: &'static str

Indicates whether the image is currently hidden from the user. Valid values: “true”, “false”.

§aria_live: &'static str

Indicates whether the content associated with the image is live and dynamic. Valid values: “off”, “assertive”, “polite”.

§aria_pressed: &'static str

Indicates whether the image is currently pressed or selected. Valid values: “true”, “false”, “mixed”, “undefined”.

§aria_controls: &'static str

ID of the element that the image controls or owns.

§aria_labelledby: &'static str

ID of the element that labels the image.

Trait Implementations§

Source§

impl Clone for ImageProps

Source§

fn clone(&self) -> ImageProps

Returns a duplicate 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 Default for ImageProps

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for ImageProps

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Properties for ImageProps

Source§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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,

Source§

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>,

Source§

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>,

Source§

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.
Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<Token, Builder, How> AllPropsFor<Builder, How> for Token
where Builder: Buildable<Token>, <Builder as Buildable<Token>>::WrappedToken: HasAllProps<<Builder as Buildable<Token>>::Output, How>,

Source§

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