pub enum BackgroundSize {
Auto,
Cover,
Contain,
Fixed {
width: Option<Coord>,
height: Option<Coord>,
},
}Expand description
How large the image is drawn, from background-size.
Variants§
Auto
auto: the size the image’s own header asks for.
Cover
cover: the smallest size that covers the box, cropped by it.
Contain
contain: the largest size that fits inside the box.
Fixed
One or two lengths. An axis left auto follows the image’s
own ratio.
Trait Implementations§
Source§impl Clone for BackgroundSize
impl Clone for BackgroundSize
Source§fn clone(&self) -> BackgroundSize
fn clone(&self) -> BackgroundSize
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 moreimpl Copy for BackgroundSize
Source§impl Debug for BackgroundSize
impl Debug for BackgroundSize
Source§impl PartialEq for BackgroundSize
impl PartialEq for BackgroundSize
Source§impl Serialize for BackgroundSize
impl Serialize for BackgroundSize
impl StructuralPartialEq for BackgroundSize
Auto Trait Implementations§
impl Freeze for BackgroundSize
impl RefUnwindSafe for BackgroundSize
impl Send for BackgroundSize
impl Sync for BackgroundSize
impl Unpin for BackgroundSize
impl UnsafeUnpin for BackgroundSize
impl UnwindSafe for BackgroundSize
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.