pub struct Cell {
pub row: usize,
pub col: usize,
pub colour: Colour,
pub cat: CellCategory,
}Fields§
§row: usize§col: usize§colour: Colour§cat: CellCategoryImplementations§
Source§impl Cell
impl Cell
pub fn new(x: usize, y: usize, colour: usize) -> Self
pub const fn new_empty() -> Self
pub fn new_colour(x: usize, y: usize, colour: Colour) -> Self
pub fn above(&self, other: &Self) -> bool
pub fn below(&self, other: &Self) -> bool
pub fn left(&self, other: &Self) -> bool
pub fn right(&self, other: &Self) -> bool
pub fn next(&self, other: &Self) -> bool
pub fn adjacent(&self, other: &Self) -> bool
pub fn next_colour(&self, other: &Self) -> bool
pub fn adjacent_colour(&self, other: &Self) -> bool
Trait Implementations§
Source§impl Ord for Cell
impl Ord for Cell
Source§impl PartialOrd for Cell
impl PartialOrd for Cell
impl Eq for Cell
Auto Trait Implementations§
impl Freeze for Cell
impl RefUnwindSafe for Cell
impl Send for Cell
impl Sync for Cell
impl Unpin for Cell
impl UnwindSafe for Cell
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more