Struct euclid::size::Size2D
[−]
[src]
pub struct Size2D<T> { pub width: T, pub height: T, }
Fields
width: T
height: T
Methods
impl<T: Clone> Size2D<T>
[src]
impl<T: Copy + Clone + Mul<T, Output=U>, U> Size2D<T>
[src]
fn area(&self) -> U
impl<T: Zero> Size2D<T>
[src]
impl<Unit, T: Clone> Size2D<Length<Unit, T>>
[src]
fn typed(width: T, height: T) -> TypedSize2D<Unit, T>
fn to_untyped(&self) -> Size2D<T>
Drop the units, preserving only the numeric value.
fn from_untyped(p: &Size2D<T>) -> TypedSize2D<Unit, T>
Tag a unitless value with units.
impl<Unit, T0: NumCast + Clone> Size2D<Length<Unit, T0>>
[src]
fn cast<T1: NumCast + Clone>(&self) -> Option<Size2D<Length<Unit, T1>>>
Cast from one numeric representation to another, preserving the units.
impl<Unit, T: NumCast + Clone> Size2D<Length<Unit, T>>
[src]
Trait Implementations
impl<T: PartialEq> PartialEq for Size2D<T>
[src]
fn eq(&self, __arg_0: &Size2D<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Size2D<T>) -> bool
This method tests for !=
.
impl<T: Encodable> Encodable for Size2D<T>
[src]
impl<T: Decodable> Decodable for Size2D<T>
[src]
impl<T: Eq> Eq for Size2D<T>
[src]
impl<T: Copy> Copy for Size2D<T>
[src]
impl<T: Clone> Clone for Size2D<T>
[src]
fn clone(&self) -> Size2D<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<T: Debug> Debug for Size2D<T>
[src]
impl<T: Display> Display for Size2D<T>
[src]
impl<T: Zero> Zero for Size2D<T>
[src]
impl<Scale: Copy, T0: Mul<Scale, Output=T1>, T1: Clone> Mul<Scale> for Size2D<T0>
[src]
type Output = Size2D<T1>
The resulting type after applying the *
operator
fn mul(self, scale: Scale) -> Size2D<T1>
The method for the *
operator