pub enum Outcome {
Success,
Failure,
}
Expand description
The outcome of a fight.
Variants
Success
The fight succeeded.
Failure
The fight failed, i.e. the group wiped.
Implementations
sourceimpl 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 StructuralEq for Outcome
impl StructuralPartialEq for Outcome
Auto Trait Implementations
impl RefUnwindSafe for Outcome
impl Send for Outcome
impl Sync for Outcome
impl Unpin for Outcome
impl UnwindSafe for Outcome
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more