Instance Method

replaceEmpty(with:)

Replaces an empty stream with the provided element.

Declaration

func replaceEmpty(with output: Output) -> Publishers.ReplaceEmpty<Record<Output, Failure>>

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.