pub trait Runtime {
// Required method
fn spawn<F>(&self, future: F) -> JoinHandle<F::Output>
where F: Future + Send + 'static,
F::Output: Send + 'static;
}Expand description
This trait provides a mockable facade for tokio::task::spawn.
Required Methods§
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§
impl Runtime for TokioRuntime
impl Runtime for TestRuntime
Available on crate feature
test-util only.