[−][src]Enum spacebattleship::game::uniform::ShotOutcome
Result of a shot on a single player's board.
Variants
The shot did not hit anything.
The shot hit the ship with the given ID, but did not sink it.
The shot hit the ship with the given ID, but the player has more ships left.
The shot hit the ship with the given ID, and all of the player's ships are now sunk. However, there are additonal players left who still have ships.
The shot hit the ship with the given ID and all players but the current player are now defeated. The current player is the winner.
Implementations
impl<I> ShotOutcome<I>
[src]
pub fn ship(&self) -> Option<&I>
[src]
Get the id of the ship that was hit.
pub fn into_ship(self) -> Option<I>
[src]
Extract the id of the ship that was hit from this result.
Trait Implementations
impl<I> From<ShotOutcome<I>> for ShotOutcome<I>
[src]
fn from(shot: BoardShotOutcome<I>) -> Self
[src]
Auto Trait Implementations
impl<I> RefUnwindSafe for ShotOutcome<I> where
I: RefUnwindSafe,
I: RefUnwindSafe,
impl<I> Send for ShotOutcome<I> where
I: Send,
I: Send,
impl<I> Sync for ShotOutcome<I> where
I: Sync,
I: Sync,
impl<I> Unpin for ShotOutcome<I> where
I: Unpin,
I: Unpin,
impl<I> UnwindSafe for ShotOutcome<I> where
I: UnwindSafe,
I: 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, 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>,