Trait http_signature_normalization_actix::Spawn

source ·
pub trait Spawn {
    type Future<T>: Future<Output = Result<T, Canceled>>;

    // 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 actix_rt’s built-in blocking threadpool, but this can be customized

Required Associated Types§

source

type Future<T>: Future<Output = Result<T, Canceled>>

The future type returned by spawn_blocking

Required Methods§

source

fn spawn_blocking<Func, Out>(&self, func: Func) -> Self::Future<Out>
where Func: FnOnce() -> Out + Send + 'static, Out: Send + 'static,

Spawn the blocking function onto the threadpool

Object Safety§

This trait is not object safe.

Implementors§