#[repr(u8)]pub enum GeneratorResult {
Stopped = 0,
Complete = 1,
}
Expand description
The result of generator runs.
A run can either run to completion, and no new values will
be produced, or it can be stopped. In case it is stopped there might be more values available
that can be obtained by calling Generator::run
again.
Variants§
Stopped = 0
Returned from Generator::run
when the generator was stopped because the output
function
returned ValueResult::Stop
Complete = 1
Returned from Generator::run
when the generator has sent all values to the output
function.
When this has been returned the generator will never generate more values again.
Trait Implementations§
Source§impl Clone for GeneratorResult
impl Clone for GeneratorResult
Source§fn clone(&self) -> GeneratorResult
fn clone(&self) -> GeneratorResult
Returns a copy 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 GeneratorResult
impl Debug for GeneratorResult
Source§impl From<bool> for GeneratorResult
impl From<bool> for GeneratorResult
Source§impl Ord for GeneratorResult
impl Ord for GeneratorResult
Source§fn cmp(&self, other: &GeneratorResult) -> Ordering
fn cmp(&self, other: &GeneratorResult) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for GeneratorResult
impl PartialEq for GeneratorResult
Source§impl PartialOrd for GeneratorResult
impl PartialOrd for GeneratorResult
impl Copy for GeneratorResult
impl Eq for GeneratorResult
impl StructuralPartialEq for GeneratorResult
Auto Trait Implementations§
impl Freeze for GeneratorResult
impl RefUnwindSafe for GeneratorResult
impl Send for GeneratorResult
impl Sync for GeneratorResult
impl Unpin for GeneratorResult
impl UnwindSafe for GeneratorResult
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