Republishes elements until another publisher emits an element.
SDKs
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
- Xcode 11.0+
Framework
- Combine
Declaration
func prefix<P>(untilOutputFrom publisher: P) -> Publishers.Prefix Until Output<Publishers.Ignore Output<Upstream>, P> where P : Publisher
Parameters
publisher
A second publisher.
Return Value
A publisher that republishes elements until the second publisher publishes an element.
Discussion
After the second publisher publishes an element, the publisher returned by this method finishes.