pub enum CoroutineState<Y, R> { Yielded(Y), Complete(R), }
coroutine_trait
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).
Coroutine::resume
Yielded
Complete
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.
yield
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.
resume
source
Hasher
Ordering
self
other
==
!=
<
<=
>
>=
TypeId
clone_to_uninit
dest
Returns the argument unchanged.
Calls U::from(self).
U::from(self)
That is, this conversion is whatever the implementation of From<T> for U chooses to do.
From<T> for U