Trait wasmer_wasix::syscalls::IntoWaker

pub(crate) 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:

  • Clone
  • Send + Sync
  • 'static
  • [Wake]
  • [ViaRawPointer]

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§

fn into_waker(self) -> Waker

Convert this object into a Waker.

Object Safety§

This trait is not object safe.

Implementors§

§

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