pub struct TaskCtx {
pub resumed_with: RtPayload,
pub selected_arm: Option<usize>,
pub new_chan: Option<ChanId>,
pub spawned: Option<TaskId>,
}Expand description
Per-poll context: what the task was resumed with.
Fields§
§resumed_with: RtPayloadThe value delivered by the blocking step that just resumed this task
(the received value for Recv/winning Select recv arm; Nothing otherwise).
selected_arm: Option<usize>For a resumed Select, the index of the arm that won; None otherwise.
new_chan: Option<ChanId>For a resumed NewChan, the id of the freshly-created channel.
spawned: Option<TaskId>For a resumed Spawn, the id of the spawned task (its handle).
Auto Trait Implementations§
impl Freeze for TaskCtx
impl RefUnwindSafe for TaskCtx
impl Send for TaskCtx
impl Sync for TaskCtx
impl Unpin for TaskCtx
impl UnsafeUnpin for TaskCtx
impl UnwindSafe for TaskCtx
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