work_queue

Trait Work

Source
pub trait Work<K, C> {
    type Future: Future;

    // Required method
    fn start(&self, key: K, context: C) -> Self::Future;
}
Expand description

Trait that creates a work future from a key and context.

Required Associated Types§

Source

type Future: Future

The future that is executed by the WorkQueue.

Required Methods§

Source

fn start(&self, key: K, context: C) -> Self::Future

Create a new Future to be executed by the WorkQueue.

Implementors§

Source§

impl<F, K, C, WF> Work<K, C> for F
where F: Fn(K, C) -> WF, WF: Future,

Source§

type Future = WF