Enum pushgen::GeneratorResult
source · #[repr(u8)]
pub enum GeneratorResult {
Stopped,
Complete,
}
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
Returned from Generator::run
when the generator was stopped because the output
function
returned ValueResult::Stop
Complete
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<GeneratorResult> for GeneratorResult
impl PartialEq<GeneratorResult> for GeneratorResult
source§fn eq(&self, other: &GeneratorResult) -> bool
fn eq(&self, other: &GeneratorResult) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<GeneratorResult> for GeneratorResult
impl PartialOrd<GeneratorResult> for GeneratorResult
source§fn partial_cmp(&self, other: &GeneratorResult) -> Option<Ordering>
fn partial_cmp(&self, other: &GeneratorResult) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more