pub enum KnownOutcome {
Decisive {
winner: Color,
},
Draw,
}Expand description
A definitive outcome of a game.
See also Outcome.
Variants§
Implementations§
Source§impl KnownOutcome
impl KnownOutcome
pub const fn from_winner(winner: Option<Color>) -> KnownOutcome
pub const fn winner(self) -> Option<Color>
pub const fn from_ascii(bytes: &[u8]) -> Result<KnownOutcome, ParseOutcomeError>
pub const fn as_str(self) -> &'static str
Trait Implementations§
Source§impl Clone for KnownOutcome
impl Clone for KnownOutcome
Source§fn clone(&self) -> KnownOutcome
fn clone(&self) -> KnownOutcome
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KnownOutcome
impl Debug for KnownOutcome
Source§impl Display for KnownOutcome
impl Display for KnownOutcome
Source§impl From<KnownOutcome> for Outcome
impl From<KnownOutcome> for Outcome
Source§fn from(outcome: KnownOutcome) -> Outcome
fn from(outcome: KnownOutcome) -> Outcome
Converts to this type from the input type.
Source§impl FromStr for KnownOutcome
impl FromStr for KnownOutcome
Source§type Err = ParseOutcomeError
type Err = ParseOutcomeError
The associated error which can be returned from parsing.
Source§fn from_str(s: &str) -> Result<KnownOutcome, ParseOutcomeError>
fn from_str(s: &str) -> Result<KnownOutcome, ParseOutcomeError>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for KnownOutcome
impl Hash for KnownOutcome
Source§impl PartialEq for KnownOutcome
impl PartialEq for KnownOutcome
impl Copy for KnownOutcome
impl Eq for KnownOutcome
impl StructuralPartialEq for KnownOutcome
Auto Trait Implementations§
impl Freeze for KnownOutcome
impl RefUnwindSafe for KnownOutcome
impl Send for KnownOutcome
impl Sync for KnownOutcome
impl Unpin for KnownOutcome
impl UnwindSafe for KnownOutcome
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more