Skip to main content

ClosureFetch

Trait ClosureFetch 

Source
pub trait ClosureFetch<Closure>: Send + Sync {
    type T;

    // Required method
    fn fetch(
        &self,
        closure: &Closure,
    ) -> impl Send + Future<Output = Result<Self::T>>;
}

Required Associated Types§

Source

type T

Required Methods§

Source

fn fetch( &self, closure: &Closure, ) -> impl Send + Future<Output = Result<Self::T>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<Closure: Send + Sync, F: for<'a> ClosureFn<'a, Closure, T = T>, T> ClosureFetch<Closure> for F

Source§

type T = T