Struct executors::ManualExecutor [] [src]

pub struct ManualExecutor<T, Queue> where T: Task, Queue: TaskQueue<T> {
    // some fields omitted
}

Manual executor. You can add tasks to it but you need to manually specify when the tasks should be invoked.

Methods

impl<T, Queue> ManualExecutor<T, Queue> where T: Task, Queue: TaskQueue<T>

fn consume(&self, amount: usize)

Execute specified number of tasks from queue.

Panics when requested to consume more than there is in queue.

Trait Implementations

impl<T, Queue> Executor<T> for ManualExecutor<T, Queue> where T: Task, Queue: TaskQueue<T>

fn queued(&self) -> usize

fn clear(&self)

fn execute_with_priority(&self, task: T, priority: usize) -> Future<T::Result, T::Error>

fn execute(&self, task: T) -> Future<T::Result, T::Error>