[][src]Struct futures::task::Context

pub struct Context<'a> { /* fields omitted */ }
🔬 This is a nightly-only experimental API. (futures_api)

futures in libcore are unstable

Information about the currently-running task.

Contexts are always tied to the stack, since they are set up specifically when performing a single poll step on a task.

Methods

impl<'a> Context<'a>
[src]

🔬 This is a nightly-only experimental API. (futures_api)

futures in libcore are unstable

Create a new task Context with the provided local_waker, waker, and spawner.

🔬 This is a nightly-only experimental API. (futures_api)

futures in libcore are unstable

Get the LocalWaker associated with the current task.

🔬 This is a nightly-only experimental API. (futures_api)

futures in libcore are unstable

Get the Waker associated with the current task.

🔬 This is a nightly-only experimental API. (futures_api)

futures in libcore are unstable

Get the spawner associated with this task.

This method is useful primarily if you want to explicitly handle spawn failures.

🔬 This is a nightly-only experimental API. (futures_api)

futures in libcore are unstable

Produce a context like the current one, but using the given waker instead.

This advanced method is primarily used when building "internal schedulers" within a task, where you want to provide some customized wakeup logic.

🔬 This is a nightly-only experimental API. (futures_api)

futures in libcore are unstable

Produce a context like the current one, but using the given spawner instead.

This advanced method is primarily used when building "internal schedulers" within a task.

Trait Implementations

impl<'a> Debug for Context<'a>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'a> !Send for Context<'a>

impl<'a> !Sync for Context<'a>

Blanket Implementations

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Important traits for &'a mut I

Immutably borrows from an owned value. Read more

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Important traits for &'a mut I

Mutably borrows from an owned value. Read more

impl<T> Any for T where
    T: 'static + ?Sized
[src]

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more