Generic Instance Method

prefix(untilOutputFrom:)

Republishes elements until another publisher emits an element.

Declaration

func prefix<P>(untilOutputFrom publisher: P) -> Publishers.PrefixUntilOutput<Publishers.TryLastWhere<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.