[−][src]Struct async_wakers::Registration
A handle for updating or removing a registered
Waker
from a Wakers
container.
This handle is returned by the register
method and contains a weak reference to a
Wakers
(this means that, while a Registration
still exists, the Wakers
it is referencing
could have already been destroyed; similarly,
a Registration
could represent a waker that
has been unregistered).
Methods
impl Registration
[src]
pub fn is_registered(&self) -> bool
[src]
Returns whether the waker is still registered.
This method will return false
if remove
has been called or if Wakers
unregistered
the waker either because unregister
or
clear
was called or because it was destroyed.
pub fn update(&mut self, waker: Waker) -> Option<Waker>
[src]
Update the registered waker and returns the
old Waker
, or None
if it has been notified
recently (and not updated after) or if it has already
been unregistered.
pub fn remove(&mut self) -> Option<Waker>
[src]
Trait Implementations
impl Debug for Registration
[src]
impl Drop for Registration
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Registration
impl Send for Registration
impl Sync for Registration
impl Unpin for Registration
impl !UnwindSafe for Registration
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,