Storage
public protocol Storage
The Storage protocol is used to define the structre for custom key-value storage implementations.
-
Stores a generic
Tvalue for a given key.Declaration
Swift
func set<T>(value: T?, for key: String)Parameters
valuegeneric
Tvalue to store.keythe key associated with the value.
-
Retrieves generic
Tvalue for a given key.Declaration
Swift
func getValue<T>(for key: String) -> T?Parameters
keythe key associated with the value.
Return Value
generic
Tvalue.
Storage Protocol Reference