Struct loom::future::AtomicWaker
source · [−]pub struct AtomicWaker { /* private fields */ }Available on crate feature
futures only.Expand description
Mock implementation of tokio::sync::AtomicWaker.
Implementations
sourceimpl AtomicWaker
impl AtomicWaker
sourcepub fn new() -> AtomicWaker
pub fn new() -> AtomicWaker
Create a new instance of AtomicWaker.
sourcepub fn register(&self, waker: Waker)
pub fn register(&self, waker: Waker)
Registers the current task to be notified on calls to wake.
sourcepub fn register_by_ref(&self, waker: &Waker)
pub fn register_by_ref(&self, waker: &Waker)
Registers the current task to be woken without consuming the value.
sourcepub fn take_waker(&self) -> Option<Waker>
pub fn take_waker(&self) -> Option<Waker>
Attempts to take the Waker value out of the AtomicWaker with the
intention that the caller will wake the task later.
Trait Implementations
sourceimpl Debug for AtomicWaker
impl Debug for AtomicWaker
Auto Trait Implementations
impl RefUnwindSafe for AtomicWaker
impl Send for AtomicWaker
impl Sync for AtomicWaker
impl Unpin for AtomicWaker
impl UnwindSafe for AtomicWaker
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more