Trait CanRunConcurrentTasks

Source
pub trait CanRunConcurrentTasks: HasStreamType {
    // Required methods
    fn run_concurrent_tasks<T>(
        &self,
        tasks: Vec<T>,
    ) -> impl Future<Output = ()> + Send
       where T: Task;
    fn run_concurrent_task_stream<T>(
        &self,
        tasks: Self::Stream<T>,
    ) -> impl Future<Output = ()> + Send
       where T: Task;
}

Required Methods§

Source

fn run_concurrent_tasks<T>( &self, tasks: Vec<T>, ) -> impl Future<Output = ()> + Send
where T: Task,

Source

fn run_concurrent_task_stream<T>( &self, tasks: Self::Stream<T>, ) -> impl Future<Output = ()> + Send
where T: Task,

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<Runtime> CanRunConcurrentTasks for Runtime
where Runtime: HasStreamType + HasComponents, Runtime::Components: ConcurrentTaskRunner<Runtime>,