pub struct ImageProps { /* private fields */ }Expand description
Builder behind Image!.
Implementations§
Source§impl ImageProps
impl ImageProps
pub fn src(self, v: impl Into<String>) -> Self
pub fn alt(self, v: impl Into<String>) -> Self
pub fn width(self, v: u32) -> Self
pub fn height(self, v: u32) -> Self
Sourcepub fn sizes(self, v: impl Into<String>) -> Self
pub fn sizes(self, v: impl Into<String>) -> Self
sizes attribute, e.g. "(max-width: 768px) 100vw, 50vw".
pub fn quality(self, v: u8) -> Self
Sourcepub fn priority(self, v: bool) -> Self
pub fn priority(self, v: bool) -> Self
Above-the-fold image: eager loading and high fetch priority.
pub fn class(self, v: impl Into<String>) -> Self
Sourcepub fn unoptimized(self, v: bool) -> Self
pub fn unoptimized(self, v: bool) -> Self
Serve src as-is (no resizing endpoint).
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 (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 ImageProps
impl Debug for ImageProps
Source§impl Default for ImageProps
impl Default 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