pub enum MediaFit {
Contain,
Cover,
Fill,
ScaleDown,
}Expand description
Box-fitting behavior controlling how visual media scales inside its viewport.
Variants§
Contain
Scales uniformly so the entire media fits inside the viewport with letterboxing if needed.
Cover
Scales uniformly to fill the entire viewport, cropping overflowing edges.
Fill
Stretches media to match the exact viewport width and height.
ScaleDown
Renders at intrinsic pixel dimensions unless larger than the viewport.
Trait Implementations§
impl Copy for MediaFit
Source§impl<'de> Deserialize<'de> for MediaFit
impl<'de> Deserialize<'de> for MediaFit
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for MediaFit
impl StructuralPartialEq for MediaFit
Auto Trait Implementations§
impl Forget for MediaFit
impl Freeze for MediaFit
impl Move for MediaFit
impl RefUnwindSafe for MediaFit
impl Send for MediaFit
impl Sync for MediaFit
impl Unpin for MediaFit
impl UnsafeUnpin for MediaFit
impl UnwindSafe for MediaFit
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