SingletonStorageDelegate
open class SingletonStorageDelegate : StorageDelegate
SingletonStorageDelegate conforming StorageDelegate protocol.
-
Create a
SingletonStorageDelegate.Declaration
Swift
public init() -
Get
StorageDataforStoreKeyfrom the in-memory storage.Declaration
Swift
@StorageActor open func data<D>(forKey key: StoreKey) -> D? where D : StorageDataParameters
keyStoreKeyto store theStorageData.Return Value
StorageDataforStoreKey. -
Set
StorageDataforStoreKeyin the in-memory storage.Declaration
Swift
@StorageActor open func set(_ data: (some StorageData)?, forKey key: StoreKey)Parameters
dataStorageDatato store.keyStoreKeyto store theStorageData. -
Remove
StorageDataforStoreKeyfrom the in-memory storage.Declaration
Swift
@StorageActor open func remove(forKey key: StoreKey)Parameters
keyStoreKeyto remove.
View on GitHub
Install in Dash