pub struct BoardSize { /* private fields */ }Implementations§
Source§impl BoardSize
impl BoardSize
pub fn new( width: usize, height: usize, mines: usize, ) -> Result<Self, BoardSizeError>
pub fn width(&self) -> NonZeroUsize
pub fn height(&self) -> NonZeroUsize
pub fn mines(&self) -> NonZeroUsize
pub fn neighbours(&self, point: Point) -> impl Iterator<Item = Point>
pub fn points(&self) -> impl Iterator<Item = Point>
Trait Implementations§
impl Copy for BoardSize
impl Eq for BoardSize
impl StructuralPartialEq for BoardSize
Auto Trait Implementations§
impl Freeze for BoardSize
impl RefUnwindSafe for BoardSize
impl Send for BoardSize
impl Sync for BoardSize
impl Unpin for BoardSize
impl UnwindSafe for BoardSize
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