Skip to main content

ClosureFn

Trait ClosureFn 

Source
pub trait ClosureFn<'a, Closure: 'a>:
    Send
    + Sync
    + Fn(&'a Closure) -> Self::Fut {
    type T;
    type Fut: Send + Future<Output = Result<Self::T>>;

    // Required method
    fn fetch(&'a self, closure: &'a Closure) -> Self::Fut;
}

Required Associated Types§

Source

type T

Source

type Fut: Send + Future<Output = Result<Self::T>>

Required Methods§

Source

fn fetch(&'a self, closure: &'a Closure) -> Self::Fut

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<'a, Closure: 'a, F: Send + Sync + Fn(&'a Closure) -> Fut, Fut: Send + Future<Output = Result<T>>, T> ClosureFn<'a, Closure> for F

Source§

type T = T

Source§

type Fut = Fut