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]

fn new(width: T, height: T) -> Size2D<T>

impl<T: Copy + Clone + Mul<T, Output=U>, U> Size2D<T>
[src]

fn area(&self) -> U

impl<T: Zero> Size2D<T>
[src]

fn zero() -> Size2D<T>

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]

fn as_f32(&self) -> Size2D<Length<Unit, f32>>

fn as_uint(&self) -> Size2D<Length<Unit, usize>>

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]

fn encode<__ST: Encoder>(&self, __arg_0: &mut __ST) -> Result<(), __ST::Error>

impl<T: Decodable> Decodable for Size2D<T>
[src]

fn decode<__DT: Decoder>(__arg_0: &mut __DT) -> Result<Size2D<T>, __DT::Error>

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]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<T: Display> Display for Size2D<T>
[src]

fn fmt(&self, formatter: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<T: Zero> Zero for Size2D<T>
[src]

fn zero() -> Size2D<T>

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

impl<Scale: Copy, T0: Div<Scale, Output=T1>, T1: Clone> Div<Scale> for Size2D<T0>
[src]

type Output = Size2D<T1>

The resulting type after applying the / operator

fn div(self, scale: Scale) -> Size2D<T1>

The method for the / operator