cooked_waker

Trait IntoWaker

Source
pub trait IntoWaker {
    // Required method
    fn into_waker(self) -> Waker;
}
Expand description

Objects that can be converted into an Waker. This trait is automatically implemented for types that fulfill the waker interface. Such types must be:

The implementation of this trait sets up a RawWakerVTable for the type, and arranges a conversion into a Waker through the ViaRawPointer trait, which should be implemented for types that be converted to and from pointers. This trait is implemented for all the standard library pointer types (such as Arc and Box), and you can implement it on your own types if you want to use them for wakers.

It should never be necessary to implement this trait manually.

Required Methods§

Source

fn into_waker(self) -> Waker

Convert this object into a Waker.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> IntoWaker for T
where T: Wake + Clone + Send + Sync + 'static + ViaRawPointer, T::Target: Sized,