Republishes elements while an error-throwing predicate closure indicates publishing should continue.
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
- Xcode 11.0+
A closure that takes an element as its parameter and returns a Boolean value indicating whether publishing should continue.
A publisher that passes through elements until the predicate throws or indicates publishing should finish.
try to emit values from the upstream publisher that meet a condition you specify in an error-throwing closure. The publisher finishes when the closure returns
false. If the closure throws an error, the publisher fails with that error.