pub trait FutureFactory<In>where
In: 'static + Send,
Self::Fut: 'static + Send + Future,
<Self::Fut as Future>::Output: 'static + Send,{
type Fut;
// Required method
fn generate(&mut self, input: In) -> Self::Fut;
// Provided methods
fn boxed<'a>(
self,
) -> BoxFutureFactory<'a, In, <Self::Fut as Future>::Output>
where Self: 'a + Sized + Send { ... }
fn compose<G>(self, other: G) -> ComposeFutureFactory<In, Self, G>
where Self: Sized,
G: 'static + Send + Clone + FutureFactory<<Self::Fut as Future>::Output>,
<G::Fut as Future>::Output: Send { ... }
}