pub struct Image {
pub src: String,
pub url: Option<String>,
pub alt: String,
pub title: Option<String>,
pub width: Option<u32>,
pub height: Option<u32>,
pub srcset: Option<String>,
pub sizes: Option<String>,
pub loading: ImageLoading,
pub is_decorative: bool,
}Expand description
An extracted image
Fields§
§src: StringOriginal src attribute
url: Option<String>Resolved absolute URL
alt: StringAlt text
title: Option<String>Title attribute
width: Option<u32>Width if specified
height: Option<u32>Height if specified
srcset: Option<String>srcset for responsive images
sizes: Option<String>sizes attribute
loading: ImageLoadingLoading strategy (lazy/eager)
is_decorative: boolWhether image is decorative (empty alt)
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Image
impl<'de> Deserialize<'de> for Image
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
Auto Trait Implementations§
impl Freeze for Image
impl RefUnwindSafe for Image
impl Send for Image
impl Sync for Image
impl Unpin for Image
impl UnwindSafe for Image
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