Enum direction::Direction[][src]

#[repr(u8)]pub enum Direction {
    North,
    NorthEast,
    East,
    SouthEast,
    South,
    SouthWest,
    West,
    NorthWest,
}

Variants

North
NorthEast
East
SouthEast
South
SouthWest
West
NorthWest

Implementations

impl Direction[src]

pub fn from_unit_coord(coord: Coord) -> Self[src]

pub fn opposite(self) -> Direction[src]

pub fn coord(self) -> Coord[src]

pub fn left90(self) -> Direction[src]

pub fn right90(self) -> Direction[src]

pub fn left45(self) -> Direction[src]

pub fn right45(self) -> Direction[src]

pub fn left135(self) -> Direction[src]

pub fn right135(self) -> Direction[src]

pub const fn bitmap_raw(self) -> u8[src]

pub const fn bitmap(self) -> DirectionBitmap[src]

pub fn is_cardinal(self) -> bool[src]

pub fn is_ordinal(self) -> bool[src]

pub fn typ(self) -> DirectionType[src]

pub fn cardinal(self) -> Option<CardinalDirection>[src]

pub fn ordinal(self) -> Option<OrdinalDirection>[src]

pub const fn all() -> DirectionIter

Notable traits for DirectionIter

impl Iterator for DirectionIter type Item = Direction;
[src]

Trait Implementations

impl Clone for Direction[src]

impl Copy for Direction[src]

impl Debug for Direction[src]

impl Eq for Direction[src]

impl From<CardinalDirection> for Direction[src]

impl From<OrdinalDirection> for Direction[src]

impl Hash for Direction[src]

impl<T> Index<Direction> for DirectionTable<T>[src]

type Output = T

The returned type after indexing.

impl<T> IndexMut<Direction> for DirectionTable<T>[src]

impl Ord for Direction[src]

impl PartialEq<Direction> for Direction[src]

impl PartialOrd<Direction> for Direction[src]

impl StructuralEq for Direction[src]

impl StructuralPartialEq for Direction[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> 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.