[−][src]Struct spacebattleship::game::uniform::ShotError
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,
C: RefUnwindSafe,
P: RefUnwindSafe,
impl<P, C> Send for ShotError<P, C> where
C: Send,
P: Send,
C: Send,
P: Send,
impl<P, C> Sync for ShotError<P, C> where
C: Sync,
P: Sync,
C: Sync,
P: Sync,
impl<P, C> Unpin for ShotError<P, C> where
C: Unpin,
P: Unpin,
C: Unpin,
P: Unpin,
impl<P, C> UnwindSafe for ShotError<P, C> where
C: UnwindSafe,
P: UnwindSafe,
C: UnwindSafe,
P: 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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,