SpawnBlockingArgs

Trait SpawnBlockingArgs 

Source
pub trait SpawnBlockingArgs<X, Y> {
    type R;
    type M;

    // Required method
    fn spawn_blocking(
        self,
        thing: Self::M,
        args: Y,
    ) -> impl Future<Output = Result<Self::R>>;
}

Required Associated Types§

Source

type R

Source

type M

Required Methods§

Source

fn spawn_blocking( self, thing: Self::M, args: Y, ) -> impl Future<Output = Result<Self::R>>

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§

Source§

impl<F, R, M, T1> SpawnBlockingArgs<(M, T1), T1> for F
where F: FnOnce(T1) -> R + Send + 'static, R: Send + 'static, T1: Send + 'static,

Source§

type R = R

Source§

type M = M

Source§

impl<F, R, M, T1, T2> SpawnBlockingArgs<(M, T1, T2), (T1, T2)> for F
where F: FnOnce(T1, T2) -> R + Send + 'static, R: Send + 'static, T1: Send + 'static, T2: Send + 'static,

Source§

type R = R

Source§

type M = M

Source§

impl<F, R, M, T1, T2, T3> SpawnBlockingArgs<(M, T1, T2, T3), (T1, T2, T3)> for F
where F: FnOnce(T1, T2, T3) -> R + Send + 'static, R: Send + 'static, T1: Send + 'static, T2: Send + 'static, T3: Send + 'static,

Source§

type R = R

Source§

type M = M