pub enum Outcome {
Success,
Failure,
}
Expand description
The outcome of a fight.
Variants§
Implementations§
Source§impl Outcome
impl Outcome
Sourcepub fn from_bool(b: bool) -> Option<Outcome>
pub fn from_bool(b: bool) -> Option<Outcome>
A function that turns a boolean into an Outcome
.
This is a convenience function that can help implementing
Analyzer::outcome
, which is also why this function returns an Option
instead of the outcome directly.
This turns true
into Outcome::Success
and false
into
Outcome::Failure
.
Trait Implementations§
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