Struct wita::Size[][src]

#[repr(C)]pub struct Size<T, U> {
    pub width: T,
    pub height: T,
    // some fields omitted
}

A generic size

Fields

width: Theight: T

Implementations

impl<T, U> Size<T, U>[src]

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

impl<T> Size<T, Logical> where
    T: Mul<Output = T> + Div<Output = T> + Copy + NumCast
[src]

pub fn to_physical(&self, dpi: T) -> Size<T, Physical>[src]

impl<T> Size<T, Physical> where
    T: Mul<Output = T> + Div<Output = T> + Copy + NumCast
[src]

pub fn to_logical(&self, dpi: T) -> Size<T, Logical>[src]

Trait Implementations

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

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

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

impl<T, U> From<[T; 2]> for Size<T, U> where
    T: Copy
[src]

impl<T, U> From<(T, T)> for Size<T, U>[src]

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

impl<T, U> StructuralPartialEq for Size<T, U>[src]

impl<T> ToLogicalSize<T> for Size<T, Logical> where
    T: Copy
[src]

impl<T> ToLogicalSize<T> for Size<T, Physical> where
    T: Mul<Output = T> + Div<Output = T> + Copy + NumCast
[src]

impl<T> ToPhysicalSize<T> for Size<T, Logical> where
    T: Mul<Output = T> + Div<Output = T> + Copy + NumCast
[src]

impl<T> ToPhysicalSize<T> for Size<T, Physical> where
    T: Copy
[src]

Auto Trait Implementations

impl<T, U> RefUnwindSafe for Size<T, U> where
    T: RefUnwindSafe,
    U: RefUnwindSafe

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

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

impl<T, U> Unpin for Size<T, U> where
    T: Unpin,
    U: Unpin

impl<T, U> UnwindSafe for Size<T, U> where
    T: UnwindSafe,
    U: UnwindSafe

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.