#[non_exhaustive]pub struct SizeInPixels {
pub width: u16,
pub height: u16,
}
Expand description
Represents a rectangular size in pixels.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.width: u16
The width in pixels.
height: u16
The height in pixels.
Implementations§
Trait Implementations§
Source§impl ClampedMul<SizeInPixels, PixelsXY> for CharsXY
impl ClampedMul<SizeInPixels, PixelsXY> for CharsXY
Source§fn clamped_mul(self, rhs: SizeInPixels) -> PixelsXY
fn clamped_mul(self, rhs: SizeInPixels) -> PixelsXY
Multiplies self by
rhs
and clamps the result to fit in O
.Source§impl Clone for SizeInPixels
impl Clone for SizeInPixels
Source§fn clone(&self) -> SizeInPixels
fn clone(&self) -> SizeInPixels
Returns a copy 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 SizeInPixels
impl Debug for SizeInPixels
Source§impl PartialEq for SizeInPixels
impl PartialEq for SizeInPixels
impl Copy for SizeInPixels
impl StructuralPartialEq for SizeInPixels
Auto Trait Implementations§
impl Freeze for SizeInPixels
impl RefUnwindSafe for SizeInPixels
impl Send for SizeInPixels
impl Sync for SizeInPixels
impl Unpin for SizeInPixels
impl UnwindSafe for SizeInPixels
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