Struct microasync_rt::RuntimeWrapper
source · pub struct RuntimeWrapper<'a>(_);
Expand description
Wrapper for anything that implements InternalRuntime, used to add a Runtime impl.
Trait Implementations§
source§impl<'a> Runtime<'a> for RuntimeWrapper<'a>
impl<'a> Runtime<'a> for RuntimeWrapper<'a>
source§fn push_boxed(
&'a mut self,
future: Pin<Box<dyn Future<Output = ()> + 'static, Global>>
)
fn push_boxed(
&'a mut self,
future: Pin<Box<dyn Future<Output = ()> + 'static, Global>>
)
Adds a new future to the queue to be completed.
source§fn spawn_boxed(
&'a mut self,
future: Pin<Box<dyn Future<Output = ()> + 'static, Global>>
) -> SpawnedFuture<'a> ⓘ
fn spawn_boxed(
&'a mut self,
future: Pin<Box<dyn Future<Output = ()> + 'static, Global>>
) -> SpawnedFuture<'a> ⓘ
Adds a new future to the queue to be completed and returns a future waiting for the added
future’s completion.
source§fn sleep<'b>(
&'a self,
duration: Duration
) -> Pin<Box<dyn Future<Output = ()> + 'b, Global>>
fn sleep<'b>(
&'a self,
duration: Duration
) -> Pin<Box<dyn Future<Output = ()> + 'b, Global>>
Asynchronously sleeps
source§fn push(&'a mut self, future: impl Future<Output = ()> + 'static)
fn push(&'a mut self, future: impl Future<Output = ()> + 'static)
Adds a new future to the queue to be completed.