[][src]Function futures_ext::split_err

pub fn split_err<S: Stream>(
    s: S
) -> (impl Stream<Item = S::Item, Error = !>, impl Future<Item = !, Error = S::Error>)

Given an input stream, split its error out to a separate Future, and returning that error Future and an infallable Stream. There are two outcomes:

  1. The stream has no error - the error future never resolves
  2. The stream has an error - the output stream terminates, and the error future resolves to the error