[−][src]Enum next_gen::GeneratorState
Value obtained when polling a GeneratorFn
.
This corresponds to:
-
either a suspension point,
-
or a termination point
Variants
The Generator
suspended with a value.
This state indicates that a Generator
has been suspended, and
corresponds to a yield_!
statement. The value provided in this variant
corresponds to the expression passed to yield_!
and allows generators
to provide a value each time they yield_!
.
The Generator
completed with a Return
value.
This state indicates that a Generator
has finished execution with
the provided value. Once a generator has returned Return
, it is
considered a programmer error to call .resume()
again.
Trait Implementations
impl<Yield: Clone, Return: Clone> Clone for GeneratorState<Yield, Return>
[src]
fn clone(&self) -> GeneratorState<Yield, Return>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<Yield: Copy, Return: Copy> Copy for GeneratorState<Yield, Return>
[src]
impl<Yield: Debug, Return: Debug> Debug for GeneratorState<Yield, Return>
[src]
impl<Yield: Eq, Return: Eq> Eq for GeneratorState<Yield, Return>
[src]
impl<Yield: Hash, Return: Hash> Hash for GeneratorState<Yield, Return>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<Yield: Ord, Return: Ord> Ord for GeneratorState<Yield, Return>
[src]
fn cmp(&self, other: &GeneratorState<Yield, Return>) -> Ordering
[src]
#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<Yield: PartialEq, Return: PartialEq> PartialEq<GeneratorState<Yield, Return>> for GeneratorState<Yield, Return>
[src]
fn eq(&self, other: &GeneratorState<Yield, Return>) -> bool
[src]
fn ne(&self, other: &GeneratorState<Yield, Return>) -> bool
[src]
impl<Yield: PartialOrd, Return: PartialOrd> PartialOrd<GeneratorState<Yield, Return>> for GeneratorState<Yield, Return>
[src]
fn partial_cmp(&self, other: &GeneratorState<Yield, Return>) -> Option<Ordering>
[src]
fn lt(&self, other: &GeneratorState<Yield, Return>) -> bool
[src]
fn le(&self, other: &GeneratorState<Yield, Return>) -> bool
[src]
fn gt(&self, other: &GeneratorState<Yield, Return>) -> bool
[src]
fn ge(&self, other: &GeneratorState<Yield, Return>) -> bool
[src]
impl<Yield, Return> StructuralEq for GeneratorState<Yield, Return>
[src]
impl<Yield, Return> StructuralPartialEq for GeneratorState<Yield, Return>
[src]
Auto Trait Implementations
impl<Yield, Return> RefUnwindSafe for GeneratorState<Yield, Return> where
Return: RefUnwindSafe,
Yield: RefUnwindSafe,
Return: RefUnwindSafe,
Yield: RefUnwindSafe,
impl<Yield, Return> Send for GeneratorState<Yield, Return> where
Return: Send,
Yield: Send,
Return: Send,
Yield: Send,
impl<Yield, Return> Sync for GeneratorState<Yield, Return> where
Return: Sync,
Yield: Sync,
Return: Sync,
Yield: Sync,
impl<Yield, Return> Unpin for GeneratorState<Yield, Return> where
Return: Unpin,
Yield: Unpin,
Return: Unpin,
Yield: Unpin,
impl<Yield, Return> UnwindSafe for GeneratorState<Yield, Return> where
Return: UnwindSafe,
Yield: UnwindSafe,
Return: UnwindSafe,
Yield: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,