A publisher that publishes an optional value to each subscriber exactly once, if the optional has a value.
- iOS 13.0+Beta
- macOS 10.15+Beta
- UIKit for Mac 13.0+Beta
- tvOS 13.0+Beta
- watchOS 6.0+Beta
- Xcode 11.0+Beta
.success, and the value is non-nil, then
Optional waits until receiving a request for at least 1 value before sending the output. If
Optional sends the failure immediately upon subscription. If
.success and the value is nil, then
.finished immediately upon subscription.
In contrast with
Optional publisher can send an error. In contrast with
Optional publisher can send zero values and finish normally, or send zero values and fail with an error.