Instance Method

replaceEmpty(with:)

Replaces an empty stream with the provided element.

Declaration

func replaceEmpty(with output: (A.Output, B.Output, C.Output)) -> Publishers.ReplaceEmpty<Publishers.Zip3<A, B, C>>

Parameters

output

An element to emit when the upstream publisher finishes without emitting any elements.

Return Value

A publisher that replaces an empty stream with the provided output element.

Discussion

If the upstream publisher finishes without producing any elements, this publisher emits the provided element, then finishes normally.