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§
Auto Trait Implementations§
impl Forget for ImageProps
impl Freeze for ImageProps
impl Move 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