pub enum SizeHint {
Scale(OrderedFloat<f32>),
Width(u32),
Height(u32),
Size(u32, u32),
}
Expand description
Given as a hint for image loading requests.
Used mostly for rendering SVG:s to a good size.
All variants will preserve the original aspect ratio.
Variants§
Scale(OrderedFloat<f32>)
Scale original size by some factor.
Width(u32)
Scale to width.
Height(u32)
Scale to height.
Size(u32, u32)
Scale to size.
Trait Implementations§
source§impl Ord for SizeHint
impl Ord for SizeHint
source§impl PartialEq for SizeHint
impl PartialEq for SizeHint
source§impl PartialOrd for SizeHint
impl PartialOrd for SizeHint
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for SizeHint
impl Eq for SizeHint
impl StructuralEq for SizeHint
impl StructuralPartialEq for SizeHint
Auto Trait Implementations§
impl RefUnwindSafe for SizeHint
impl Send for SizeHint
impl Sync for SizeHint
impl Unpin for SizeHint
impl UnwindSafe for SizeHint
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