pub struct Bounds {
pub width: Option<u32>,
pub height: Option<u32>,
pub mode: Option<ScalingMode>,
}Fields§
§width: Option<u32>width of the image
height: Option<u32>height of the image
mode: Option<ScalingMode>mode of scaling
Implementations§
Source§impl Bounds
impl Bounds
pub fn new() -> Self
pub fn fit() -> Self
pub fn cover() -> Self
pub fn contain() -> Self
pub fn exact() -> Self
pub fn mode(self, mode: impl Into<Option<ScalingMode>>) -> Self
pub fn w(self, width: impl Into<Option<u32>>) -> Self
pub fn h(self, height: impl Into<Option<u32>>) -> Self
pub fn max_width(self, width: impl Into<Option<u32>>) -> Self
pub fn max_height(self, height: impl Into<Option<u32>>) -> Self
pub fn max_dim(self, dim: impl Into<Option<u32>>) -> Self
pub fn max_dimension(self, dim: impl Into<Option<u32>>) -> Self
Trait Implementations§
Source§impl Ord for Bounds
impl Ord for Bounds
Source§impl PartialOrd for Bounds
impl PartialOrd for Bounds
impl Copy for Bounds
impl Eq for Bounds
impl StructuralPartialEq for Bounds
Auto Trait Implementations§
impl Freeze for Bounds
impl RefUnwindSafe for Bounds
impl Send for Bounds
impl Sync for Bounds
impl Unpin for Bounds
impl UnwindSafe for Bounds
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