#[repr(transparent)]pub struct Waker { /* private fields */ }Expand description
Implementations
impl Waker
source
impl Waker
sourcepub fn wake_by_ref(&self)
source
pub fn wake_by_ref(&self)
sourceWake up the task associated with this Waker without consuming the Waker.
This is similar to wake, but may be slightly less efficient in the case
where an owned Waker is available. This method should be preferred to
calling waker.clone().wake().
pub fn will_wake(&self, other: &Waker) -> bool
source
pub fn will_wake(&self, other: &Waker) -> bool
sourceReturns true if this Waker and another Waker have awoken the same task.
This function works on a best-effort basis, and may return false even
when the Wakers would awaken the same task. However, if this function
returns true, it is guaranteed that the Wakers will awaken the same task.
This function is primarily used for optimization purposes.
Trait Implementations
impl Send for Waker
sourceimpl Sync for Waker
sourceimpl Unpin for Waker
sourceAuto Trait Implementations
impl RefUnwindSafe for Waker
impl UnwindSafe for Waker
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
source
impl<T> BorrowMut<T> for T where
T: ?Sized,
sourcefn borrow_mut(&mut self) -> &mut T
const: unstable · source
fn borrow_mut(&mut self) -> &mut T
const: unstable · sourceMutably borrows from an owned value. Read more