init(upstream:predicate:)
Creates a publisher that republishes elements while a predicate closure indicates publishing should continue.
Declaration
init(upstream: Upstream, predicate: @escaping (Publishers.PrefixWhile<Upstream>.Output) -> Bool)Parameters
- upstream:
The publisher from which this publisher receives elements.
- predicate:
The closure that determines whether publishing should continue.