pub struct Context<'a> {
waker: &'a Waker,
_marker: PhantomData<fn(_: &'a ()) -> &'a ()>,
_marker2: PhantomData<*mut ()>,
}
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.
Fields§
§waker: &'a Waker
§_marker: PhantomData<fn(_: &'a ()) -> &'a ()>
§_marker2: PhantomData<*mut ()>
Implementations§
Trait Implementations§
Auto Trait Implementations§
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> UnwindSafe for Context<'a>
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