pub struct ImageMedia {Show 18 fields
pub src: String,
pub absolute_url: Option<String>,
pub alt: Option<String>,
pub title: Option<String>,
pub width: Option<u32>,
pub height: Option<u32>,
pub format: ImageFormat,
pub mime_type: Option<String>,
pub loading: ImageLoading,
pub is_decorative: bool,
pub srcset: Vec<SrcsetEntry>,
pub sizes: Option<String>,
pub data_src: Option<String>,
pub is_placeholder: bool,
pub size_bytes: Option<usize>,
pub content_hash: Option<String>,
pub classes: Vec<String>,
pub id: Option<String>,
}Expand description
Extracted image
Fields§
§src: StringOriginal src attribute
absolute_url: Option<String>Resolved absolute URL
alt: Option<String>Alt text
title: Option<String>Title attribute
width: Option<u32>Width in pixels
height: Option<u32>Height in pixels
format: ImageFormatImage format
mime_type: Option<String>MIME type
loading: ImageLoadingLoading strategy
is_decorative: boolIs decorative (empty alt)
srcset: Vec<SrcsetEntry>Srcset entries for responsive images
sizes: Option<String>Sizes attribute
data_src: Option<String>Data-src for lazy loading
is_placeholder: boolIs placeholder/low quality
size_bytes: Option<usize>File size in bytes (after download)
content_hash: Option<String>Content hash (SHA256)
classes: Vec<String>CSS classes
id: Option<String>ID attribute
Trait Implementations§
Source§impl Clone for ImageMedia
impl Clone for ImageMedia
Source§fn clone(&self) -> ImageMedia
fn clone(&self) -> ImageMedia
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 ImageMedia
impl Debug for ImageMedia
Source§impl Default for ImageMedia
impl Default for ImageMedia
Source§impl<'de> Deserialize<'de> for ImageMedia
impl<'de> Deserialize<'de> for ImageMedia
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 ImageMedia
impl RefUnwindSafe for ImageMedia
impl Send for ImageMedia
impl Sync for ImageMedia
impl Unpin for ImageMedia
impl UnwindSafe for ImageMedia
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