pub struct Context<'a> { /* private fields */ }Expand description
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§
Trait Implementations§
Auto Trait Implementations§
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> UnwindSafe for Context<'a>
Blanket Implementations§
source§impl<T> Also for T
impl<T> Also for T
source§impl<T> AnyExt for Twhere
T: Any,
impl<T> AnyExt for Twhere
T: Any,
source§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
Available on crate feature
any only.Returns the type name of
self. Read moresource§fn as_any_ref(&self) -> &dyn Anywhere
Self: Sized,
fn as_any_ref(&self) -> &dyn Anywhere
Self: Sized,
Available on crate feature
any only.source§fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
Available on crate feature
any only.source§impl<T, Res> Apply<Res> for Twhere
T: ?Sized,
impl<T, Res> Apply<Res> for Twhere
T: ?Sized,
source§fn apply<F: FnOnce(Self) -> Res>(self, f: F) -> Reswhere
Self: Sized,
fn apply<F: FnOnce(Self) -> Res>(self, f: F) -> Reswhere
Self: Sized,
Available on crate feature
result only.Apply a function which takes the parameter by value.
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
source§impl<T> Mem for Twhere
T: ?Sized,
impl<T> Mem for Twhere
T: ?Sized,
source§const NEEDS_DROP: bool = _
const NEEDS_DROP: bool = _
Available on crate feature
mem only.Whether dropping values of this type matters.
source§fn mem_needs_drop(&self) -> bool
fn mem_needs_drop(&self) -> bool
Available on crate feature
mem only.Returns
true if dropping values of this type matters.source§fn mem_drop(self)where
Self: Sized,
fn mem_drop(self)where
Self: Sized,
Available on crate feature
mem only.Drops
self by running its destructor.source§fn mem_forget(self)where
Self: Sized,
fn mem_forget(self)where
Self: Sized,
Available on crate feature
mem only.Forgets about
self without running its destructor.source§fn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
fn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
Available on crate feature
mem only.Replaces
self with other, returning the previous value of self.source§fn mem_take(&mut self) -> Selfwhere
Self: Default,
fn mem_take(&mut self) -> Selfwhere
Self: Default,
Available on crate feature
mem only.Replaces
self with its default value, returning the previous value of self.source§fn mem_swap(&mut self, other: &mut Self)where
Self: Sized,
fn mem_swap(&mut self, other: &mut Self)where
Self: Sized,
Available on crate feature
mem only.Swaps the value of
self and other without deinitializing either one.source§fn mem_as_bytes(&self) -> &[u8] ⓘ
fn mem_as_bytes(&self) -> &[u8] ⓘ
Available on crate features
mem and unsafe_mem only.source§impl<T> Size for T
impl<T> Size for T
source§const BYTE_ALIGN: usize = _
const BYTE_ALIGN: usize = _
Available on crate feature
mem only.The alignment of this type in bytes.
source§const BYTE_SIZE: usize = _
const BYTE_SIZE: usize = _
Available on crate feature
mem only.The size of this type in bytes.
source§const PTR_SIZE: usize = 4usize
const PTR_SIZE: usize = 4usize
Available on crate feature
mem only.The size of a pointer in bytes, for the current platform.
source§fn byte_align(&self) -> usize
fn byte_align(&self) -> usize
Available on crate feature
mem only.Returns the alignment of this type in bytes.