Contents

predicate

A closure that evaluates each received element.

Declaration

let predicate: (Upstream.Output) throws -> Bool

Discussion

Return true to continue, or false to cancel the upstream and complete. The closure may throw, in which case the publisher cancels the upstream publisher and fails with the thrown error.

See Also

Inspecting publisher properties