pub struct Puzzle {
pub tiles: HashSet<Tile>,
pub vec: Vec<Option<Tile>>,
}
Fields§
§tiles: HashSet<Tile>
§vec: Vec<Option<Tile>>
Implementations§
Source§impl Puzzle
impl Puzzle
pub fn push(&mut self, tile: Option<Tile>)
pub fn insert(&mut self, position: usize, tile: Option<Tile>)
pub fn remove(&mut self, position: usize) -> Option<Tile>
pub fn at(&self, position: usize) -> Option<Tile>
pub fn contains(&self, tile: Tile) -> Option<usize>
pub fn len(&self) -> usize
Trait Implementations§
impl Eq for Puzzle
impl StructuralPartialEq for Puzzle
Auto Trait Implementations§
impl Freeze for Puzzle
impl RefUnwindSafe for Puzzle
impl Send for Puzzle
impl Sync for Puzzle
impl Unpin for Puzzle
impl UnwindSafe for Puzzle
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<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