Struct primitives::foundation::Size2D [−][src]
#[repr(C)]pub struct Size2D<T> {
pub width: T,
pub height: T,
}
Expand description
A 2d size tagged with a unit.
Fields
width: T
The extent of the element in the U
units along the x
axis (usually horizontal).
height: T
The extent of the element in the U
units along the y
axis (usually vertical).
Implementations
The same as Zero::zero()
but available without importing trait.
Constructor setting all components to the same value.
Tag a unitless value with units.
Return this size as an array of two elements (width, then height).
Return this size as a tuple of two elements (width, then height).
Returns result of multiplication of both components
Trait Implementations
Performs the +=
operation. Read more
Performs the /=
operation. Read more
Performs the *=
operation. Read more
Performs the -=
operation. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for Size2D<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Size2D<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more