pub struct ImageProps {
pub src: String,
pub alt: String,
pub aspect_ratio: Option<String>,
pub placeholder_label: Option<String>,
}Expand description
Props for Image component.
Fields§
§src: String§alt: String§aspect_ratio: Option<String>§placeholder_label: Option<String>Optional label shown in a skeleton placeholder that sits behind the
image. When the image fails to load (or is still being generated),
the <img> is hidden via onerror and the placeholder remains
visible, keeping the container at its aspect-ratio size.
Trait Implementations§
Source§impl Clone for ImageProps
impl Clone for ImageProps
Source§fn clone(&self) -> ImageProps
fn clone(&self) -> ImageProps
Returns a duplicate 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 Debug for ImageProps
impl Debug for ImageProps
Source§impl<'de> Deserialize<'de> for ImageProps
impl<'de> Deserialize<'de> for ImageProps
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for ImageProps
impl JsonSchema for ImageProps
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ImageProps
impl PartialEq for ImageProps
Source§impl Serialize for ImageProps
impl Serialize for ImageProps
impl Eq for ImageProps
impl StructuralPartialEq for ImageProps
Auto Trait Implementations§
impl Freeze for ImageProps
impl RefUnwindSafe for ImageProps
impl Send for ImageProps
impl Sync for ImageProps
impl Unpin for ImageProps
impl UnsafeUnpin 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