Enum pushgen::TryReduction [−][src]
pub enum TryReduction<T> { Complete(T), Partial(T), }
Expand description
The result value of a try_*
reduction.
A try_*
reduction can either be partial, producing an intermediate value, or complete. Partial
reductions can for instance be created when trying to reduce a spuriously stopping generator.
Variants
Implementations
Check if the reduction is complete.
Examples
Basic usage:
use pushgen::TryReduction; let x = TryReduction::Complete(()); assert!(x.is_complete()); assert!(!x.is_partial());
Check if the reduction is partial.
Examples
Basic usage:
use pushgen::TryReduction; let x = TryReduction::Partial(()); assert!(x.is_partial()); assert!(!x.is_complete());
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for TryReduction<T> where
T: RefUnwindSafe,
impl<T> Send for TryReduction<T> where
T: Send,
impl<T> Sync for TryReduction<T> where
T: Sync,
impl<T> Unpin for TryReduction<T> where
T: Unpin,
impl<T> UnwindSafe for TryReduction<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more