pub struct ImageProps { /* private fields */ }Expand description
Builder behind Image!.
Implementations§
Source§impl ImageProps
impl ImageProps
pub fn src(self, v: impl Into<String>) -> ImageProps
pub fn alt(self, v: impl Into<String>) -> ImageProps
pub fn width(self, v: u32) -> ImageProps
pub fn height(self, v: u32) -> ImageProps
Sourcepub fn sizes(self, v: impl Into<String>) -> ImageProps
pub fn sizes(self, v: impl Into<String>) -> ImageProps
sizes attribute, e.g. "(max-width: 768px) 100vw, 50vw".
pub fn quality(self, v: u8) -> ImageProps
Sourcepub fn priority(self, v: bool) -> ImageProps
pub fn priority(self, v: bool) -> ImageProps
Above-the-fold image: eager loading and high fetch priority.
pub fn class(self, v: impl Into<String>) -> ImageProps
Sourcepub fn unoptimized(self, v: bool) -> ImageProps
pub fn unoptimized(self, v: bool) -> ImageProps
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
Source§fn default() -> ImageProps
fn default() -> ImageProps
Returns the “default value” for a type. Read more
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