#[repr(transparent)]pub struct Waker { /* private fields */ }Expand description
Implementations
sourceimpl Waker
impl Waker
sourcepub fn wake_by_ref(&self)
pub fn wake_by_ref(&self)
Wake 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().
sourcepub fn will_wake(&self, other: &Waker) -> bool
pub fn will_wake(&self, other: &Waker) -> bool
Returns 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
impl Sync for Waker
impl Unpin for Waker
Auto Trait Implementations
impl RefUnwindSafe for Waker
impl UnwindSafe for Waker
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