Contents

init(upstream:predicate:)

Creates a publisher that emits a Boolean value upon receiving an element that satisfies the throwing predicate closure.

Declaration

init(upstream: Upstream, predicate: @escaping (Upstream.Output) throws -> Bool)

Parameters

  • upstream:

    The publisher from which this publisher receives elements.

  • predicate:

    The error-throwing closure that determines whether this publisher should emit a Boolean true element.