pub struct Dim2;Expand description
2D dimension.
Trait Implementations§
Source§impl Dimensionable for Dim2
impl Dimensionable for Dim2
Source§const ZERO_OFFSET: <Dim2 as Dimensionable>::Offset
const ZERO_OFFSET: <Dim2 as Dimensionable>::Offset
Zero offset. Read more
Source§type Offset = [u32; 2]
type Offset = [u32; 2]
Offset type of a dimension (used to caracterize addition and subtraction of sizes, mostly).
Source§fn width(size: <Dim2 as Dimensionable>::Size) -> u32
fn width(size: <Dim2 as Dimensionable>::Size) -> u32
Width of the associated
Dimensionable::Size.Source§fn height(size: <Dim2 as Dimensionable>::Size) -> u32
fn height(size: <Dim2 as Dimensionable>::Size) -> u32
Height of the associated
Dimensionable::Size. If it doesn’t have one, set it to 1.Source§fn y_offset(off: <Dim2 as Dimensionable>::Offset) -> u32
fn y_offset(off: <Dim2 as Dimensionable>::Offset) -> u32
Y offset. If it doesn’t have one, set it to 0.
Source§fn count(_: <Dim2 as Dimensionable>::Size) -> usize
fn count(_: <Dim2 as Dimensionable>::Size) -> usize
Amount of pixels this size represents. Read more
impl Copy for Dim2
Auto Trait Implementations§
impl Freeze for Dim2
impl RefUnwindSafe for Dim2
impl Send for Dim2
impl Sync for Dim2
impl Unpin for Dim2
impl UnwindSafe for Dim2
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