[][src]Struct block_breaker::Position

pub struct Position { /* fields omitted */ }

A generic position

Methods

impl Position[src]

pub fn new(x: u16, y: u16) -> Position[src]

Create a new position

pub fn x(&self) -> u16[src]

Get the x coordinate

pub fn y(&self) -> u16[src]

Get the y coordinate

Trait Implementations

impl Add<Position> for Position[src]

type Output = Self

The resulting type after applying the + operator.

impl<'a, 'b> Add<&'b Position> for &'a Position[src]

type Output = Position

The resulting type after applying the + operator.

impl<'a, 'b> Add<&'b Vector> for &'a Position[src]

type Output = Position

The resulting type after applying the + operator.

impl<'a, 'b> Add<&'b Position> for &'a Vector[src]

type Output = Position

The resulting type after applying the + operator.

impl Sub<Position> for Position[src]

type Output = Self

The resulting type after applying the - operator.

impl AddAssign<Position> for Position[src]

impl<'a> AddAssign<&'a Position> for Position[src]

impl SubAssign<Position> for Position[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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