Context in core::task - Rust (original) (raw)

Struct Context

1.36.0 · Source

pub struct Context<'a> { /* private fields */ }

Expand description

The context of an asynchronous task.

Currently, Context only serves to provide access to a &Wakerwhich can be used to wake the current task.

Source§

1.36.0 (const: 1.82.0) · Source

Creates a new Context from a &Waker.

1.36.0 (const: 1.82.0) · Source

Returns a reference to the Waker for the current task.

Source

🔬This is a nightly-only experimental API. (local_waker #118959)

Returns a reference to the LocalWaker for the current task.

Source

🔬This is a nightly-only experimental API. (context_ext #123392)

Returns a reference to the extension data for the current task.

§

§

§

§

§

§