pub struct ImageCandidate {
pub url: String,
pub density: Option<f64>,
pub width: Option<u64>,
pub height: Option<u64>,
}Expand description
One image candidate from a srcset attribute.
Fields§
§url: StringThe image URL.
density: Option<f64>The pixel density descriptor (2x → 2.0), if present.
width: Option<u64>The width descriptor (480w → 480), if present.
height: Option<u64>The (future-compat) height descriptor (200h → 200), if present.
Trait Implementations§
Source§impl Clone for ImageCandidate
impl Clone for ImageCandidate
Source§fn clone(&self) -> ImageCandidate
fn clone(&self) -> ImageCandidate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ImageCandidate
impl Debug for ImageCandidate
Source§impl Default for ImageCandidate
impl Default for ImageCandidate
Source§fn default() -> ImageCandidate
fn default() -> ImageCandidate
Returns the “default value” for a type. Read more
Source§impl PartialEq for ImageCandidate
impl PartialEq for ImageCandidate
Source§fn eq(&self, other: &ImageCandidate) -> bool
fn eq(&self, other: &ImageCandidate) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ImageCandidate
Auto Trait Implementations§
impl Freeze for ImageCandidate
impl RefUnwindSafe for ImageCandidate
impl Send for ImageCandidate
impl Sync for ImageCandidate
impl Unpin for ImageCandidate
impl UnsafeUnpin for ImageCandidate
impl UnwindSafe for ImageCandidate
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