[][src]Struct spacebattleship::game::uniform::ShotError

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

Error returned when trying to shoot a cell.

Implementations

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

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

Get the reason the shot failed.

pub fn player(&self) -> &P[src]

Get the ID of the player that was shot at.

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

Get the coordinate that was shot at.

pub fn into_inner(self) -> (P, C)[src]

Extract the player ID and coordinates from the error.

Trait Implementations

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

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

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

Auto Trait Implementations

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

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

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

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

impl<P, C> UnwindSafe for ShotError<P, C> where
    C: UnwindSafe,
    P: 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.