---
title: "replaceEmpty(with:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/result/publisher-swift.struct/replaceempty(with:)"
---

# replaceEmpty(with:)

## Declaration

```swift
func replaceEmpty(with output: Result<Success, Failure>.Publisher.Output) -> Result<Result<Success, Failure>.Publisher.Output, Failure>.Publisher
```
