Struct Dimensions
pub struct Dimensions { /* private fields */ }Implementations§
§impl Dimensions
impl Dimensions
pub fn new(width: u32, height: u32) -> Result<Dimensions, DimensionsError>
pub fn width(&self) -> u32
pub fn height(&self) -> u32
pub fn area(&self) -> u64
pub fn is_landscape(&self) -> bool
pub fn is_portrait(&self) -> bool
pub fn is_square(&self) -> bool
Trait Implementations§
§impl Clone for Dimensions
impl Clone for Dimensions
§fn clone(&self) -> Dimensions
fn clone(&self) -> Dimensions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for Dimensions
impl Debug for Dimensions
§impl PartialEq for Dimensions
impl PartialEq for Dimensions
impl Copy for Dimensions
impl Eq for Dimensions
impl StructuralPartialEq for Dimensions
Auto Trait Implementations§
impl Freeze for Dimensions
impl RefUnwindSafe for Dimensions
impl Send for Dimensions
impl Sync for Dimensions
impl Unpin for Dimensions
impl UnsafeUnpin for Dimensions
impl UnwindSafe for Dimensions
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