#[non_exhaustive]pub struct Image {Show 14 fields
pub data_map: DataMap,
pub alt: Option<Cow<'static, str>>,
pub src: Option<Cow<'static, str>>,
pub srcset: Option<Cow<'static, str>>,
pub sizes: Option<Cow<'static, str>>,
pub crossorigin: Option<Cow<'static, str>>,
pub usemap: Option<Cow<'static, str>>,
pub ismap: Option<Cow<'static, str>>,
pub width: Option<Cow<'static, str>>,
pub height: Option<Cow<'static, str>>,
pub referrerpolicy: Option<Cow<'static, str>>,
pub decoding: Option<Cow<'static, str>>,
pub loading: Option<Cow<'static, str>>,
pub fetchpriority: Option<Cow<'static, str>>,
/* private fields */
}
Expand description
The HTML <img>
element
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.data_map: DataMap
§alt: Option<Cow<'static, str>>
Replacement text for use when images are not available
src: Option<Cow<'static, str>>
Address of the resource
srcset: Option<Cow<'static, str>>
Images to use in different situations, e.g., high-resolution displays, small monitors, etc.
sizes: Option<Cow<'static, str>>
Image sizes for different page layouts
crossorigin: Option<Cow<'static, str>>
How the element handles crossorigin requests
usemap: Option<Cow<'static, str>>
Name of image map to use
ismap: Option<Cow<'static, str>>
Whether the image is a server-side image map
width: Option<Cow<'static, str>>
Horizontal dimension
height: Option<Cow<'static, str>>
Vertical dimension
referrerpolicy: Option<Cow<'static, str>>
Referrer policy for fetches initiated by the element
decoding: Option<Cow<'static, str>>
Decoding hint to use when processing this image for presentation
loading: Option<Cow<'static, str>>
Used when determining loading deferral
fetchpriority: Option<Cow<'static, str>>
Sets the priority for fetches initiated by the element