Instance Methodpointfreeco.swift-sharing 2.2.0Sharing
load(context:continuation:)
AppStorageKey.swift:375func load(context: LoadContext<Value>, continuation: LoadContinuation<Value>)
func load(context: LoadContext<Value>, continuation: LoadContinuation<Value>)
s7Sharing13AppStorageKeyV4load7context12continuationyAA11LoadContextOyxG_AA0H12ContinuationVyxGtF
What are these?8GX1M
import Sharing
Instantly share state among your app’s features and external persistence layers, including user defaults, the file system, and more.
struct AppStorageKey<Value> where Value : Sendable
A type defining a user defaults persistence strategy.
enum LoadContext<Value>
The context in which a value is loaded by a SharedReaderKey
.
struct LoadContinuation<Value>
A mechanism to communicate with a shared key’s external system, synchronously or asynchronously.
var id: AppStorageKeyID { get }
func save(_ value: Value, context _: SaveContext, continuation: SaveContinuation)
func subscribe(context: LoadContext<Value>, subscriber: SharedSubscriber<Value>) -> SharedSubscription