Struct gomoku_core::Directions
[−]
[src]
pub struct Directions<T>(_);
Represent all the 8 directions.
The only way to create a Direction is from a [T; 8]
.
Methods
impl<T> Directions<T>
[src]
fn top(&self) -> &T
fn top_right(&self) -> &T
fn right(&self) -> &T
fn bot_right(&self) -> &T
fn bot(&self) -> &T
fn bot_left(&self) -> &T
fn left(&self) -> &T
fn top_left(&self) -> &T
fn count<P>(&self, predicate: P) -> usize where
P: FnMut(&T) -> bool,
P: FnMut(&T) -> bool,
fn any<P>(&self, predicate: P) -> bool where
P: FnMut(&T) -> bool,
P: FnMut(&T) -> bool,
Trait Implementations
impl<T: Debug> Debug for Directions<T>
[src]
impl<T: PartialEq> PartialEq for Directions<T>
[src]
fn eq(&self, other: &Directions<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<T> From<[T; 8]> for Directions<T>
[src]
impl<T> Deref for Directions<T>
[src]
type Target = [T; 8]
The resulting type after dereferencing
fn deref(&self) -> &Self::Target
The method called to dereference a value