futures-rs icon indicating copy to clipboard operation
futures-rs copied to clipboard

TryAny and TryAll equivalent of All and Any with TryStreamExt

Open barvirm opened this issue 3 years ago • 0 comments

Implementation of TryAll and TryAny predicates for TrySteamExt. Most of the code is reused from TryFold implementation. The difference between TryFold and TryAll, TryAny is in an early exit. TryAll, TryAny has 2 early exits

  1. On error (same as TryFold)
  2. On spec. boolean value [TryAll => false, TryAny => true]. But I'm not sure, what should happen if there is an error somewhere in the stream, but we exit early.

barvirm avatar Jan 03 '22 17:01 barvirm