FnFactory

Trait FnFactory 

Source
pub trait FnFactory<In, Out>
where Self::Fn: 'static + Send + FnOnce() -> Out, In: 'static + Send, Out: 'static + Send,
{ type Fn; // Required methods fn generate(&mut self, input: In) -> Self::Fn; fn boxed(self) -> BoxFnFactory<In, Out> where Self: 'static + Send; fn chain<GOut, G>(self, other: G) -> BoxFnFactory<In, GOut> where Self: 'static + Send + Sized, G: 'static + Send + Clone + FnFactory<Out, GOut>, GOut: 'static + Send, G::Fn: 'static + Send + FnOnce() -> GOut; }

Required Associated Types§

Required Methods§

Source

fn generate(&mut self, input: In) -> Self::Fn

Source

fn boxed(self) -> BoxFnFactory<In, Out>
where Self: 'static + Send,

Source

fn chain<GOut, G>(self, other: G) -> BoxFnFactory<In, GOut>
where Self: 'static + Send + Sized, G: 'static + Send + Clone + FnFactory<Out, GOut>, GOut: 'static + Send, G::Fn: 'static + Send + FnOnce() -> GOut,

Implementors§

Source§

impl<F, In, Out, Func> FnFactory<In, Out> for F
where F: FnMut(In) -> Func, Func: 'static + Send + FnOnce() -> Out, In: 'static + Send, Out: 'static + Send,

Source§

type Fn = Func