Generic Instance Method

replaceNil(with:)

Replaces nil elements in the stream with the provided element.

Declaration

func replaceNil<T>(with output: T) -> Publishers.Map<Publishers.IgnoreOutput<Upstream>, T>

Parameters

output

The element to use when replacing nil.

Return Value

A publisher that replaces nil elements from the upstream publisher with the provided element.