Publishes a single Boolean value that indicates whether all received elements pass a given predicate.
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
- Xcode 11.0+
A closure that evaluates each received element. Return
trueto continue, or
falseto cancel the upstream and complete.
A publisher that publishes a Boolean value that indicates whether all received elements pass a given predicate.
When this publisher receives an element, it runs the predicate against the element. If the predicate returns
false, the publisher produces a
false value and finishes. If the upstream publisher finishes normally, this publisher produces a
true value and finishes. As a
reduce-style operator, this publisher produces at most one value. Backpressure note: Upon receiving any request greater than zero, this publisher requests unlimited elements from the upstream publisher.