pub enum Outcome {
Known(KnownOutcome),
Unknown,
}Expand description
Outcome of a game, if any.
Variants§
Known(KnownOutcome)
1-0, 0-1, or 1/2-1/2.
Unknown
* - Game in progress, game abandoned, or result otherwise unknown.
Implementations§
Source§impl Outcome
impl Outcome
pub const fn from_known(outcome: Option<KnownOutcome>) -> Outcome
pub const fn known(self) -> Option<KnownOutcome>
pub const fn is_known(self) -> bool
pub const fn is_unknown(self) -> bool
pub const fn winner(self) -> Option<Color>
pub fn from_ascii(bytes: &[u8]) -> Result<Outcome, ParseOutcomeError>
pub const fn as_str(self) -> &'static str
Trait Implementations§
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.
impl Copy for Outcome
impl Eq for Outcome
impl StructuralPartialEq for Outcome
Auto Trait Implementations§
impl Freeze for Outcome
impl RefUnwindSafe for Outcome
impl Send for Outcome
impl Sync for Outcome
impl Unpin for Outcome
impl UnwindSafe for Outcome
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