Struct wita::Position[][src]

#[repr(C)]pub struct Position<T, U> {
    pub x: T,
    pub y: T,
    // some fields omitted
}

A generic position

Fields

x: Ty: T

Implementations

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

pub fn new(x: T, y: T) -> Self[src]

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

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

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

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

Trait Implementations

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

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

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

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

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

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

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

impl<T> ToLogicalPosition<T> for Position<T, Logical> where
    T: Copy
[src]

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

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

impl<T> ToPhysicalPosition<T> for Position<T, Physical> where
    T: Copy
[src]

Auto Trait Implementations

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

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

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

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

impl<T, U> UnwindSafe for Position<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.