[−][src]Struct spacebattleship::board::CellRef
Reference to a particular cell in the grid.
Implementations
impl<'a, I, D: Dimensions> CellRef<'a, I, D>
[src]
pub fn coord(&self) -> &D::Coordinate
[src]
The grid coordinate of this cell.
pub fn hit(&self) -> bool
[src]
Whether this cell has been hit previously.
pub fn ship(&self) -> Option<ShipRef<'a, I, D>>
[src]
The ship reference for the ship that occupies this cell, if any.
Trait Implementations
impl<'a, I: Clone, D: Clone + Dimensions> Clone for CellRef<'a, I, D> where
D::Coordinate: Clone,
[src]
D::Coordinate: Clone,
impl<'a, I: Copy, D: Copy + Dimensions> Copy for CellRef<'a, I, D> where
D::Coordinate: Copy,
[src]
D::Coordinate: Copy,
impl<'a, I: Debug, D: Debug + Dimensions> Debug for CellRef<'a, I, D> where
D::Coordinate: Debug,
[src]
D::Coordinate: Debug,
Auto Trait Implementations
impl<'a, I, D> RefUnwindSafe for CellRef<'a, I, D> where
D: RefUnwindSafe,
I: RefUnwindSafe,
<D as Dimensions>::Coordinate: RefUnwindSafe,
D: RefUnwindSafe,
I: RefUnwindSafe,
<D as Dimensions>::Coordinate: RefUnwindSafe,
impl<'a, I, D> Send for CellRef<'a, I, D> where
D: Sync,
I: Sync,
<D as Dimensions>::Coordinate: Send + Sync,
D: Sync,
I: Sync,
<D as Dimensions>::Coordinate: Send + Sync,
impl<'a, I, D> Sync for CellRef<'a, I, D> where
D: Sync,
I: Sync,
<D as Dimensions>::Coordinate: Sync,
D: Sync,
I: Sync,
<D as Dimensions>::Coordinate: Sync,
impl<'a, I, D> Unpin for CellRef<'a, I, D> where
<D as Dimensions>::Coordinate: Unpin,
<D as Dimensions>::Coordinate: Unpin,
impl<'a, I, D> UnwindSafe for CellRef<'a, I, D> where
D: RefUnwindSafe,
I: RefUnwindSafe,
<D as Dimensions>::Coordinate: RefUnwindSafe + UnwindSafe,
D: RefUnwindSafe,
I: RefUnwindSafe,
<D as Dimensions>::Coordinate: RefUnwindSafe + UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,