pub trait TaskRuntime:
'static
+ Send
+ Sync {
// Required method
fn spawn_task(
&self,
kind: TaskType,
task: impl Future<Output = ()> + Send + 'static,
);
}Expand description
Something where we can put in async functions and have them execute
eventually.
All of our task functions are either of the type “perform some computation and return” or of the type “perform some blocking IO and computation and return”. Regular blocking IO is used, not any kind of async IO.
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.