BorshRustEnumCodec<T> class

Rust Enum Codec

A codec for fixed-length arrays with multiple data types.

Inheritance

Constructors

BorshRustEnumCodec.new(List<BorshCodec<T>?> variants)
Creates a codec for fixed-length arrays with multiple data types.
const

Properties

decoder BorshRustEnumDecoder<T>
Returns the decoder of this, converting from T to S.
no setter
encoder BorshRustEnumEncoder<T>
Returns the encoder from S to T.
no setter
hashCode int
The hash code for this object.
no setterinherited
inverted Codec<Iterable<int>, RustEnum<T>>
Inverts this.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
variants List<BorshCodec<T>?>
The enum variants codecs.
finalinherited

Methods

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

Operators

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