Protocol
Storable
public protocol Storable: Identifiable where ID == String
A protocol defining an instance capable of being turned into
some Data, while being identified by some Label.
Relationships
Conforms To
Identifiable
Default Implementations
init(decoding:)
init(decoding data: Data) throws
Init an instance decoding some Data.
Parameters
| Name | Type | Description |
|---|---|---|
| data | Data |
Some |
Throws
Any Error.
encoded()
func encoded() throws -> Data
Encode the instance into some Data.
Throws
Any Error.
Returns
Some Data.
Requirements
init(decoding:)
init(decoding data: Data) throws
Init an instance decoding some Data.
Parameters
| Name | Type | Description |
|---|---|---|
| data | Data |
Some |
Throws
Any Error.
encoded()
func encoded() throws -> Data
Encode the instance into some Data.
Throws
Any Error.
Returns
Some Data.