pub struct Dimensions {
pub width: u16,
pub height: u16,
}Fields§
§width: u16§height: u16Implementations§
Source§impl Dimensions
impl Dimensions
pub fn to_tuple<Size: From<u16>>(&self) -> (Size, Size)
pub fn to_slice<Size: From<u16>>(&self) -> [Size; 2]
pub fn to_u16_tuple(&self) -> (u16, u16)
pub fn to_u16_slice(&self) -> (u16, u16)
pub fn to_usize_tuple(&self) -> (usize, usize)
pub fn to_usize_slice(&self) -> (usize, usize)
pub fn from_raw_fd<FileDescriptor: AsRawFd>(fd: FileDescriptor) -> Dimensions
pub fn get() -> Dimensions
Trait Implementations§
Source§impl Clone for Dimensions
impl Clone for Dimensions
Source§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 moreSource§impl Debug for Dimensions
impl Debug for Dimensions
Source§impl<Size> Into<[Size; 2]> for Dimensions
impl<Size> Into<[Size; 2]> for Dimensions
Source§impl<Size> Into<(Size, Size)> for Dimensions
impl<Size> Into<(Size, Size)> for Dimensions
Source§fn into(self) -> (Size, Size)
fn into(self) -> (Size, Size)
Converts this type into the (usually inferred) input type.
Source§impl Ord for Dimensions
impl Ord for Dimensions
Source§fn cmp(&self, other: &Dimensions) -> Ordering
fn cmp(&self, other: &Dimensions) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Dimensions
impl PartialEq for Dimensions
Source§impl PartialOrd for Dimensions
impl PartialOrd 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 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