StorageDelegate
public protocol StorageDelegate : AnyObject
StorageDelegate protocol.
-
Returns the
StorageDataassociated with the specifiedStoreKey.Throws
StorageDelegateimplementation possible errors.Declaration
Swift
@StorageActor func data<D>(forKey key: StoreKey) throws -> D? where D : StorageDataParameters
keyA
StoreKeyin storage. -
Sets the value of the specified
StoreKeyto the specifiedStorageData.Throws
StorageDelegateimplementation possible errors.Declaration
Swift
@StorageActor func set(_ data: (some StorageData)?, forKey key: StoreKey) throwsParameters
dataStorageDatato store.keyThe
StoreKeywith which to associate the value. -
Removes the value of the specified
StoreKey.Throws
StorageDelegateimplementation possible errors.Declaration
Swift
@StorageActor func remove(forKey key: StoreKey) throwsParameters
keyThe
StoreKeywhose value you want to remove.
View on GitHub
Install in Dash