pub trait Spawn {
type Future<T>: Future<Output = Result<T, Canceled>> + Send
where T: Send;
// Required method
fn spawn_blocking<Func, Out>(&self, func: Func) -> Self::Future<Out>
where Func: FnOnce() -> Out + Send + 'static,
Out: Send + 'static;
}Expand description
A trait dictating how to spawn a future onto a blocking threadpool. By default, http-signature-normalization-actix will use tokio’s built-in blocking threadpool, but this can be customized
Required Associated Types§
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.