[][src]Struct spacebattleship::board::ShotError

pub struct ShotError<C: Debug> { /* fields omitted */ }

Error returned when trying to shoot a cell.

Implementations

impl<C: Debug> ShotError<C>[src]

pub fn reason(&self) -> CannotShootReason[src]

Get the reason the shot failed.

pub fn coord(&self) -> &C[src]

Get the coordinate of the shot cell.

pub fn into_coord(self) -> C[src]

Extract the coordinate of the shot cell.

Trait Implementations

impl<C: Debug> Debug for ShotError<C>[src]

impl<C: Debug> Display for ShotError<C>[src]

impl<C: Debug> Error for ShotError<C>[src]

Auto Trait Implementations

impl<C> RefUnwindSafe for ShotError<C> where
    C: RefUnwindSafe

impl<C> Send for ShotError<C> where
    C: Send

impl<C> Sync for ShotError<C> where
    C: Sync

impl<C> Unpin for ShotError<C> where
    C: Unpin

impl<C> UnwindSafe for ShotError<C> where
    C: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.