Function unfold
fn unfold<T, F, R, Item, E>(init: T, function: F) -> Unfold<T, F, R>
where
F: FnMut(T, Item) -> R,
R: Future<Output = Result<T, E>>
Create a sink from a function which processes one item at a time.
Examples
# block_on.unwrap;