Struct Context
struct Context<'a> { ... }
The context of an asynchronous task.
Currently, Context only serves to provide access to a &Waker
which can be used to wake the current task.
Implementations
impl<'a> Context<'a>
const fn from_waker(waker: &'a Waker) -> SelfCreates a new
Contextfrom a&Waker.const fn waker(self: &Self) -> &'a WakerReturns a reference to the
Wakerfor the current task.const fn local_waker(self: &Self) -> &'a LocalWakerReturns a reference to the
LocalWakerfor the current task.const fn ext(self: &mut Self) -> &mut dyn AnyReturns a reference to the extension data for the current task.
impl Debug for Context<'_>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<'a> Freeze for Context<'a>
impl<'a> RefUnwindSafe for Context<'a>
impl<'a> Send for Context<'a>
impl<'a> Sync for Context<'a>
impl<'a> Unpin for Context<'a>
impl<'a> UnsafeUnpin for Context<'a>
impl<'a> UnwindSafe for Context<'a>
impl<T> Any for Context<'a>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Context<'a>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Context<'a>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for Context<'a>
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into for Context<'a>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Context<'a>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Context<'a>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>