Skip to main content

Executor

Trait Executor 

Source
pub trait Executor {
    // Required method
    fn map<T: Sync, R: Send>(
        &self,
        items: &[T],
        f: &(dyn Fn(&T) -> R + Sync),
    ) -> Vec<R>;
}
Expand description

Runs f over items and returns the results in input order.

Required Methods§

Source

fn map<T: Sync, R: Send>( &self, items: &[T], f: &(dyn Fn(&T) -> R + Sync), ) -> Vec<R>

Applies f to every item. Implementations may run calls concurrently.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§