pub trait WakeRef {
// Required method
fn wake_by_ref(&self);
}Expand description
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§
Sourcefn wake_by_ref(&self)
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.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".