Struct ContextBuilder
struct ContextBuilder<'a> { ... }
A Builder used to construct a Context instance
with support for LocalWaker.
Examples
use ;
use Future;
let local_waker = noop;
let waker = noop;
let mut cx = from_waker
.local_waker
.build;
let mut future = pin!;
let poll = future.as_mut.poll;
assert_eq!;
Implementations
impl<'a> ContextBuilder<'a>
const fn from_waker(waker: &'a Waker) -> SelfCreates a ContextBuilder from a Waker.
const fn from(cx: &'a mut Context<'_>) -> SelfCreates a ContextBuilder from an existing Context.
const fn waker(self: Self, waker: &'a Waker) -> SelfSets the value for the waker on
Context.const fn local_waker(self: Self, local_waker: &'a LocalWaker) -> SelfSets the value for the local waker on
Context.const fn ext(self: Self, data: &'a mut dyn Any) -> SelfSets the value for the extension data on
Context.const fn build(self: Self) -> Context<'a>Builds the
Context.
impl<'a> Debug for ContextBuilder<'a>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<'a> Freeze for ContextBuilder<'a>
impl<'a> RefUnwindSafe for ContextBuilder<'a>
impl<'a> Send for ContextBuilder<'a>
impl<'a> Sync for ContextBuilder<'a>
impl<'a> Unpin for ContextBuilder<'a>
impl<'a> UnsafeUnpin for ContextBuilder<'a>
impl<'a> UnwindSafe for ContextBuilder<'a>
impl<T> Any for ContextBuilder<'a>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for ContextBuilder<'a>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for ContextBuilder<'a>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for ContextBuilder<'a>
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into for ContextBuilder<'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 ContextBuilder<'a>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for ContextBuilder<'a>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>