BorshRustEnumSizedCodec<T> class
Rust Enum Sized Codec
A codec for complex Rust style enums with sized data types (tuple or struct constructors).
- Inheritance
- Mixed-in types
Constructors
-
BorshRustEnumSizedCodec.new(List<
BorshCodecFixedSized< variants)T> ?> -
Creates a codec for complex Rust style enums with sized data types (tuple or struct
constructors).
const
Properties
- byteLength → int
-
The number of bytes required to store
any
instance ofT
(i.e. max size).no setteroverride -
decoder
→ BorshRustEnumSizedDecoder<
T> -
Returns the decoder of
this
, converting fromT
toS
.no setter -
encoder
→ BorshRustEnumSizedEncoder<
T> -
Returns the encoder from
S
toT
.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<
BorshCodecFixedSized< T> ?> -
The enum variants codecs.
finalinherited
Methods
-
cOption(
) → BorshOptionSizedCodec< RustEnum< T> > -
Converts this codec to an c-option code of type
T
.inherited -
decode(
Iterable< int> encoded) → RustEnum<T> -
Decodes
encoded
data.inherited -
encode(
RustEnum< T> input) → Iterable<int> -
Encodes
input
.inherited -
fuse<
R> (Codec< Iterable< other) → Codec<int> , R>RustEnum< T> , R> -
Fuses
this
withother
.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
option(
) → BorshOptionSizedCodec< RustEnum< T> > -
Converts this codec to an option code of type
T
.inherited -
pack(
BufferWriter buffer, RustEnum< T> input) → void -
Writes
input
tobuffer
.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
frombuffer
.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited