-
Notifications
You must be signed in to change notification settings - Fork 0
CoderProtocol
ratranqu edited this page Apr 7, 2021
·
2 revisions
The protocol Coder describes the primitives required to serialize structures. A Coder accumulates bytes into a buffer which can then be pushed to storage. The reference implementation uses Amino.
public protocol CoderProtocol
static func encode(_ to: inout Data, int64: Int64)
static func encode(_ to: inout Data, int8: Int8)
static func encode<Bytes: DataProtocol>(_ to: inout Data, bytes: Bytes)
static func decode<T: Decodable>(_ type: T.Type, from: Data) throws -> T
static func encode<T: Encodable>(_ object: T) throws -> Data
Generated at 2021-04-20T11:34:45+0000 using swift-doc 1.0.0-beta.5.