Enum grafix_toolbox::lib::ops::CoroutineState
source · pub enum CoroutineState<Y, R> {
Yielded(Y),
Complete(R),
}coroutine_trait)Expand description
The result of a coroutine resumption.
This enum is returned from the Coroutine::resume method and indicates the
possible return values of a coroutine. Currently this corresponds to either
a suspension point (Yielded) or a termination point (Complete).
Variants§
Yielded(Y)
coroutine_trait)The coroutine suspended with a value.
This state indicates that a coroutine has been suspended, and typically
corresponds to a yield statement. The value provided in this variant
corresponds to the expression passed to yield and allows coroutines to
provide a value each time they yield.
Complete(R)
coroutine_trait)The coroutine completed with a return value.
This state indicates that a coroutine has finished execution with the
provided value. Once a coroutine has returned Complete it is
considered a programmer error to call resume again.
Trait Implementations§
source§impl<Y, R> Clone for CoroutineState<Y, R>
impl<Y, R> Clone for CoroutineState<Y, R>
source§fn clone(&self) -> CoroutineState<Y, R>
fn clone(&self) -> CoroutineState<Y, R>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl<Y, R> Debug for CoroutineState<Y, R>
impl<Y, R> Debug for CoroutineState<Y, R>
source§impl<Y, R> Hash for CoroutineState<Y, R>
impl<Y, R> Hash for CoroutineState<Y, R>
source§impl<Y, R> Ord for CoroutineState<Y, R>
impl<Y, R> Ord for CoroutineState<Y, R>
source§fn cmp(&self, other: &CoroutineState<Y, R>) -> Ordering
fn cmp(&self, other: &CoroutineState<Y, R>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl<Y, R> PartialEq for CoroutineState<Y, R>
impl<Y, R> PartialEq for CoroutineState<Y, R>
source§fn eq(&self, other: &CoroutineState<Y, R>) -> bool
fn eq(&self, other: &CoroutineState<Y, R>) -> bool
self and other values to be equal, and is used
by ==.source§impl<Y, R> PartialOrd for CoroutineState<Y, R>where
Y: PartialOrd,
R: PartialOrd,
impl<Y, R> PartialOrd for CoroutineState<Y, R>where
Y: PartialOrd,
R: PartialOrd,
source§fn partial_cmp(&self, other: &CoroutineState<Y, R>) -> Option<Ordering>
fn partial_cmp(&self, other: &CoroutineState<Y, R>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moreimpl<Y, R> Copy for CoroutineState<Y, R>
impl<Y, R> Eq for CoroutineState<Y, R>
impl<Y, R> StructuralPartialEq for CoroutineState<Y, R>
Auto Trait Implementations§
impl<Y, R> Freeze for CoroutineState<Y, R>
impl<Y, R> RefUnwindSafe for CoroutineState<Y, R>where
Y: RefUnwindSafe,
R: RefUnwindSafe,
impl<Y, R> Send for CoroutineState<Y, R>
impl<Y, R> Sync for CoroutineState<Y, R>
impl<Y, R> Unpin for CoroutineState<Y, R>
impl<Y, R> UnwindSafe for CoroutineState<Y, R>where
Y: UnwindSafe,
R: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
source§impl<A> MemoizedArgs<A> for A
impl<A> MemoizedArgs<A> for A
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.