[][src]Struct gee::Size

pub struct Size<T> {
    pub width: T,
    pub height: T,
}

Fields

width: Theight: T

Methods

impl<T> Size<T>
[src]

pub fn new(width: T, height: T) -> Self
[src]

pub fn to_vector(self) -> Vector<T>
[src]

impl<T: Mul> Size<T>
[src]

pub fn area(self) -> T::Output
[src]

impl<T: Copy + Mul<Output = T> + Div<Output = T>> Size<T>
[src]

pub fn scaled_to_width(self, rhs: T) -> Size<T>
[src]

pub fn scaled_to_height(self, rhs: T) -> Size<T>
[src]

impl<T: Copy + Mul<Output = T> + Div<Output = T> + Ord> Size<T>
[src]

pub fn scaled_to_fill(self, rhs: Size<T>) -> Size<T>
[src]

impl<T: Ord> Size<T>
[src]

pub fn is_landscape(&self) -> bool
[src]

pub fn is_portrait(&self) -> bool
[src]

pub fn is_square(&self) -> bool
[src]

Trait Implementations

impl<T: PartialEq> PartialEq<Size<T>> for Size<T>
[src]

impl<T: Eq> Eq for Size<T>
[src]

impl<T: PartialOrd> PartialOrd<Size<T>> for Size<T>
[src]

impl<T: Ord> Ord for Size<T>
[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl<T: Clone> Clone for Size<T>
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T: Default> Default for Size<T>
[src]

impl<T: Copy> Copy for Size<T>
[src]

impl<T: AddAssign<RHS>, RHS> AddAssign<Size<RHS>> for Size<T>
[src]

impl<T: Debug> Debug for Size<T>
[src]

impl<T: Hash> Hash for Size<T>
[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<T: Add<RHS, Output = Output>, RHS, Output> Add<Size<RHS>> for Size<T>
[src]

type Output = Size<Output>

The resulting type after applying the + operator.

impl<T: Mul<RHS>, RHS: Copy> Mul<RHS> for Size<T>
[src]

type Output = Size<T::Output>

The resulting type after applying the * operator.

impl<T: Div<RHS>, RHS: Copy> Div<RHS> for Size<T>
[src]

type Output = Size<T::Output>

The resulting type after applying the / operator.

impl<T: Rem<RHS>, RHS: Copy> Rem<RHS> for Size<T>
[src]

type Output = Size<T::Output>

The resulting type after applying the % operator.

impl<T: MulAssign<RHS>, RHS: Copy> MulAssign<RHS> for Size<T>
[src]

impl<T: DivAssign<RHS>, RHS: Copy> DivAssign<RHS> for Size<T>
[src]

impl<T: RemAssign<RHS>, RHS: Copy> RemAssign<RHS> for Size<T>
[src]

Auto Trait Implementations

impl<T> Send for Size<T> where
    T: Send

impl<T> Sync for Size<T> where
    T: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]