pub struct HashState { /* private fields */ }Trait Implementations§
Source§impl State for HashState
impl State for HashState
Source§fn from_array(arr: &[u8; 9]) -> HashState
fn from_array(arr: &[u8; 9]) -> HashState
Returns the
State from the board.
If the array is illegal, i.e. not a permutation of 0..9, the result is undefined.Source§fn hash(&self) -> u32
fn hash(&self) -> u32
Returns the hash of the states.
It should be in range of 0..NUMBER_OF_STATES.
fn neighbors(&self) -> Vec<(Direction, Self)>
fn move_blank<I: Iterator<Item = usize>>( &self, indices: I, offset: isize, ) -> Option<Self>
fn up(&self) -> Option<Self>
fn down(&self) -> Option<Self>
fn left(&self) -> Option<Self>
fn right(&self) -> Option<Self>
impl Copy for HashState
impl Eq for HashState
impl StructuralPartialEq for HashState
Auto Trait Implementations§
impl Freeze for HashState
impl RefUnwindSafe for HashState
impl Send for HashState
impl Sync for HashState
impl Unpin for HashState
impl UnsafeUnpin for HashState
impl UnwindSafe for HashState
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