Instance Method

replaceEmpty(with:)

Replaces an empty stream with the provided element.

Declaration

func replaceEmpty(with output: (Output0, Output1)) -> Publishers.ReplaceEmpty<Publishers.MapKeyPath2<Upstream, Output0, Output1>>

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.