1 2 3 4 5 6 7 8 9 10
use std::future::Future; /// A future-based worker that for each input, one output is produced. pub trait Oneshot: Future { /// Incoming message type. type Input; /// Creates an oneshot worker. fn create(input: Self::Input) -> Self; }