Function fastsink::make_sink[][src]

pub fn make_sink<S, F, T, A, E>(init: S, f: F) -> SinkImpl<S, F, T, A, E> where
    F: FnMut(S, Action<A>) -> T,
    T: Future<Output = Result<S, E>>, 

Returns a Sink impl based on the initial value and the given closure.

The closure will be applied to the initial value and an Action that informs it about the action it should perform. The returned Future will resolve to another value and the process starts over using this output.