Generic Instance Method

prefix(untilOutputFrom:)

Republishes elements until another publisher emits an element.

Declaration

func prefix<P>(untilOutputFrom publisher: P) -> Publishers.PrefixUntilOutput<Publishers.Concatenate<Prefix, Suffix>, 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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software