pub fn try_group<T, G, E>(
inp: impl Iterator<Item = Result<T, E>>,
belong: impl Fn(&T, &T) -> bool,
construct: impl Fn(&mut Option<Vec<T>>) -> G,
) -> impl Iterator<Item = Result<G, E>>Expand description
Same as group but handles errors in the input stream, making it
easier to use (and more efficient?) than group in that case. Also,
continues building the group, so in case the receiver of the
output stream continues to read past errors, they will still
receive groups, and erros do not break up groups (this would not
be possible to achieve via group).