[][src]Struct klondike_lib::Coords

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

Fields

x: i32y: i32

Methods

impl Coords[src]

pub const fn from_xy(x: i32, y: i32) -> Coords[src]

pub const fn from_x(x: i32) -> Coords[src]

pub const fn from_y(y: i32) -> Coords[src]

pub const fn to_x(&self) -> Coords[src]

pub const fn to_y(&self) -> Coords[src]

pub const fn as_row_col(&self) -> (u16, u16)[src]

Trait Implementations

impl Eq for Coords[src]

impl Clone for Coords[src]

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

Performs copy-assignment from source. Read more

impl Copy for Coords[src]

impl PartialOrd<Coords> for Coords[src]

impl PartialEq<Coords> for Coords[src]

impl Default for Coords[src]

impl Add<Coords> for Coords[src]

type Output = Coords

The resulting type after applying the + operator.

impl Sub<Coords> for Coords[src]

type Output = Coords

The resulting type after applying the - operator.

impl Mul<i32> for Coords[src]

type Output = Coords

The resulting type after applying the * operator.

impl Mul<Coords> for i32[src]

type Output = Coords

The resulting type after applying the * operator.

impl Div<i32> for Coords[src]

type Output = Coords

The resulting type after applying the / operator.

impl AddAssign<Coords> for Coords[src]

impl SubAssign<Coords> for Coords[src]

impl MulAssign<i32> for Coords[src]

impl DivAssign<i32> for Coords[src]

impl Debug for Coords[src]

Auto Trait Implementations

impl Send for Coords

impl Sync for Coords

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
    U: Into<T>, 
[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, 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> Any for T where
    T: 'static + ?Sized
[src]

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