---
title: "init(_:)"
framework: swift
role: symbol
role_heading: Initializer
path: "swift/result/publisher-swift.struct/init(_:)-516t"
---

# init(_:)

Creates a publisher that delivers the specified result.

## Declaration

```swift
init(_ result: Result<Result<Success, Failure>.Publisher.Output, Failure>)
```

## Parameters

- `result`: The result to deliver to each subscriber.

## Discussion

Discussion If result is Swift/Result/success, then the publisher waits until it receives a request for at least one value, then sends the output to all subscribers and finishes normally. If result is Swift/Result/failure, then the publisher sends the failure immediately upon subscription.

## See Also

### Creating a Result Publisher

- [init(_:)](swift/result/publisher-swift.struct/init(_:)-69fv4.md)
- [init(_:)](swift/result/publisher-swift.struct/init(_:)-7t2tt.md)
