Instance Methodpointfreeco.swift-sharing 2.2.0Sharing
yield(_:)
Yield an updated value from an external source.
func yield(_ value: Value)
Parameters
- value
An updated value.
Yield an updated value from an external source.
func yield(_ value: Value)
An updated value.
import Sharing
Instantly share state among your app’s features and external persistence layers, including user defaults, the file system, and more.
struct SharedSubscriber<Value>
A mechanism to synchronize with a shared key’s external system.
init(callback: @escaping (Result<Value?, any Error>) -> Void)
func yield(throwing error: any Error)
Yield an error from an external source.
func yield(with result: Result<Value?, any Error>)
Yield a result of an updated value or error from an external source.
func yieldReturningInitialValue()
Yield the initial value provided to the property wrapper when none exists in the external source.