pub enum Fit {
Fill,
Contain,
Cover,
}Expand description
How an Image fills its box when their shapes differ, as CSS’s
object-fit.
Variants§
Fill
Stretched to the box. The default.
Contain
As large as fits whole, centered, keeping its shape.
Cover
Covering the whole box, centered, keeping its shape; what sticks out is cut off.
Trait Implementations§
impl Copy for Fit
impl Eq for Fit
impl StructuralPartialEq for Fit
Auto Trait Implementations§
impl Forget for Fit
impl Freeze for Fit
impl Move for Fit
impl RefUnwindSafe for Fit
impl Send for Fit
impl Sync for Fit
impl Unpin for Fit
impl UnsafeUnpin for Fit
impl UnwindSafe for Fit
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