pub enum ResumeKind {
Nothing,
Spawn {
func: FuncIdx,
args: Vec<RtPayload>,
priority: u8,
is_main: bool,
},
Payload(RtPayload),
Select {
arm: usize,
payload: RtPayload,
},
NewChan(ChanId),
SpawnedHandle(TaskId),
}Expand description
How a worker should (re)enter a task body on its next poll. Every variant is
Send (FuncIdx is u16, RtPayload is Send, ids are Copy).
Variants§
Nothing
First entry / a block that yields no value (Send/Close/Yield/Sleep).
Spawn
Fresh spawn: build the body from this function + materialised args.
is_main distinguishes the program’s root task (whose body is the
top-level program, not a spawned function) so the builder positions it
correctly.
Payload(RtPayload)
Resume a pinned continuation with a delivered value (Recv/TryRecv/Await).
Select
Resume a Select winner: the winning arm index + its (recv) payload.
NewChan(ChanId)
Resume after NewChan with the freshly-created channel id.
SpawnedHandle(TaskId)
Resume after a handle-bearing spawn with the child’s task id.
Auto Trait Implementations§
impl Freeze for ResumeKind
impl RefUnwindSafe for ResumeKind
impl Send for ResumeKind
impl Sync for ResumeKind
impl Unpin for ResumeKind
impl UnsafeUnpin for ResumeKind
impl UnwindSafe for ResumeKind
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