pub enum SuspendKind {
Initial,
Yield,
YieldStar,
Await,
}Expand description
Why a frame parked, which decides how the resumption is delivered.
Variants§
Initial
initial_yield: the body has not started. The first next() resumes after it
without passing a value, because there is no yield expression to receive one.
Yield
yield expr: the value is on the stack and the caller gets {value, done:false}.
YieldStar
yield* expr: like Yield, but the value is already an {value, done} object
from the inner iterator and is handed straight back.
Await
await expr: the value is a promise the async machinery has to settle first.
Trait Implementations§
Source§impl Clone for SuspendKind
impl Clone for SuspendKind
impl Copy for SuspendKind
Source§impl Debug for SuspendKind
impl Debug for SuspendKind
impl Eq for SuspendKind
Source§impl PartialEq for SuspendKind
impl PartialEq for SuspendKind
impl StructuralPartialEq for SuspendKind
Auto Trait Implementations§
impl Forget for SuspendKind
impl Freeze for SuspendKind
impl Move for SuspendKind
impl RefUnwindSafe for SuspendKind
impl Send for SuspendKind
impl Sync for SuspendKind
impl Unpin for SuspendKind
impl UnsafeUnpin for SuspendKind
impl UnwindSafe for SuspendKind
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