[][src]Trait cooked_waker::WakeRef

pub trait WakeRef {
    fn wake_by_ref(&self);
}

Wakers that can wake by reference. This trait is used to enable a Wake implementation for types that don't own an underlying handle, like Arc<T> and &T.

This trait is implemented for most container and reference types, like &T where T: WakeRef, Box<T: WakeRef>, and Arc<T: WakeRef>.

Required methods

fn wake_by_ref(&self)

Wake up the task by reference. In general Wake::wake should be preferred, if available, as it's probably more efficient.

A Waker created by IntoWaker will call this method through Waker::wake_by_ref.

Loading content...

Implementations on Foreign Types

impl<T: WakeRef + ?Sized> WakeRef for Box<T>[src]

impl<T: WakeRef + ?Sized> WakeRef for Arc<T>[src]

impl<T: WakeRef + ?Sized> WakeRef for Weak<T>[src]

impl<T: WakeRef + ?Sized> WakeRef for Rc<T>[src]

impl<T: WakeRef + ?Sized> WakeRef for Weak<T>[src]

impl<T: WakeRef> WakeRef for Option<T>[src]

impl WakeRef for Waker[src]

Loading content...

Implementors

impl<'_, T: WakeRef> WakeRef for &'_ T[src]

Loading content...