[][src]Struct doryen_extra::Position

pub struct Position {
    pub x: i32,
    pub y: i32,
}

A struct representing a Position determined by its x and y values.

Fields

x: i32

The x value the Position is currently representing.

y: i32

The y value the Position is currently representing.

Implementations

impl Position[src]

pub const ORIGIN: Self[src]

A constant representing a Position where both x and y are 0.

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

Returns a Position with the given x and y values.

Trait Implementations

impl Add<(i32, i32)> for Position[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<Position> for Position[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<Size> for Position[src]

type Output = Rectangle

The resulting type after applying the + operator.

impl Add<USize> for Position[src]

type Output = Rectangle

The resulting type after applying the + operator.

impl Add<i32> for Position[src]

type Output = Self

The resulting type after applying the + operator.

impl AddAssign<(i32, i32)> for Position[src]

impl AddAssign<i32> for Position[src]

impl Clone for Position[src]

impl Copy for Position[src]

impl Debug for Position[src]

impl Default for Position[src]

impl Display for Position[src]

impl Div<i32> for Position[src]

type Output = Self

The resulting type after applying the / operator.

impl DivAssign<i32> for Position[src]

impl Eq for Position[src]

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

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

impl Mul<i32> for Position[src]

type Output = Self

The resulting type after applying the * operator.

impl MulAssign<i32> for Position[src]

impl Neg for Position[src]

type Output = Self

The resulting type after applying the - operator.

impl PartialEq<Position> for Position[src]

impl Rem<i32> for Position[src]

type Output = Self

The resulting type after applying the % operator.

impl RemAssign<i32> for Position[src]

impl StructuralEq for Position[src]

impl StructuralPartialEq for Position[src]

impl Sub<(i32, i32)> for Position[src]

type Output = Self

The resulting type after applying the - operator.

impl Sub<Position> for Position[src]

type Output = Self

The resulting type after applying the - operator.

impl Sub<i32> for Position[src]

type Output = Self

The resulting type after applying the - operator.

impl SubAssign<(i32, i32)> for Position[src]

impl SubAssign<i32> for Position[src]

Auto Trait Implementations

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> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> Erased for T

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

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

impl<T, Rhs> NumAssignOps<Rhs> for T where
    T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>, 
[src]

impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
    T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>, 
[src]

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,