pub trait Backend<Req> {
type Stream: Stream<Item = Result<Option<Req>, Error>>;
type Layer;
type Codec: Codec;
// Required method
fn poll(self, worker: &Worker<Context>) -> Poller<Self::Stream, Self::Layer>;
}
Expand description
A backend represents a task source
Both Storage
and MessageQueue
need to implement it for workers to be able to consume tasks