futures-rs
futures-rs copied to clipboard
TryAny and TryAll equivalent of All and Any with TryStreamExt
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
- On error (same as TryFold)
- 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.