BorshStructSizedCodec class

Struct Sized Codec

A codec for borsh serializable objects with sized fields.

Inheritance
Mixed-in types

Constructors

BorshStructSizedCodec.new(Map<String, BorshCodecFixedSized> schema)
Creates a codec for borsh serializable objects with sized fields.
const

Properties

byteLength int
The number of bytes required to store any instance of T (i.e. max size).
no setteroverride
decoder BorshStructSizedDecoder
Returns the decoder of this, converting from T to S.
no setter
encoder BorshStructSizedEncoder
Returns the encoder from S to T.
no setter
hashCode int
The hash code for this object.
no setterinherited
inverted Codec<Iterable<int>, Map<String, dynamic>>
Inverts this.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schema Map<String, BorshCodecFixedSized>
The ordered field codecs.
finalinherited

Methods

cOption() BorshOptionSizedCodec<Map<String, dynamic>>
Converts this codec to an c-option code of type T.
inherited
decode(Iterable<int> encoded) Map<String, dynamic>
Decodes encoded data.
inherited
encode(Map<String, dynamic> input) Iterable<int>
Encodes input.
inherited
fuse<R>(Codec<Iterable<int>, R> other) Codec<Map<String, dynamic>, R>
Fuses this with other.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
option() BorshOptionSizedCodec<Map<String, dynamic>>
Converts this codec to an option code of type T.
inherited
pack(BufferWriter buffer, Map<String, dynamic> input) → void
Writes input to buffer.
inherited
size(Map<String, dynamic> input) int
Returns the serialized byte length of input.
inherited
toString() String
A string representation of this object.
inherited
unpack(BufferReader buffer) Map<String, dynamic>
Reads T from buffer.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited