pub enum MazeCellState {
Empty,
Wall,
SolutionStep {
value: usize,
},
}Expand description
Represents the state of a maze cell
§Variants
Empty: An empty cell that is not currently part of a solution pathWall: A wallSolutionStep- a cell that has been visited as thevalue’th step in an attempt to find the maze solution
Variants§
Implementations§
Source§impl MazeCellState
impl MazeCellState
Sourcepub fn step_value(&self) -> Option<usize>
pub fn step_value(&self) -> Option<usize>
Returns the step value (if any) associated with the cell state instance
§Returns
The step value (if variant is of type SolutionStep) else None
Trait Implementations§
Source§impl Clone for MazeCellState
impl Clone for MazeCellState
Source§fn clone(&self) -> MazeCellState
fn clone(&self) -> MazeCellState
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MazeCellState
impl Debug for MazeCellState
Source§impl<'de> Deserialize<'de> for MazeCellState
impl<'de> Deserialize<'de> for MazeCellState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for MazeCellState
impl Display for MazeCellState
Source§impl PartialEq for MazeCellState
impl PartialEq for MazeCellState
Source§impl Serialize for MazeCellState
impl Serialize for MazeCellState
impl StructuralPartialEq for MazeCellState
Auto Trait Implementations§
impl Freeze for MazeCellState
impl RefUnwindSafe for MazeCellState
impl Send for MazeCellState
impl Sync for MazeCellState
impl Unpin for MazeCellState
impl UnwindSafe for MazeCellState
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