BorshCodecFixedSized<T> mixin
Codec Fixed Sized
Adds a byteLength property to BorshCodecs for data types with a known max size.
- Superclass constraints
- BorshCodec<
T>
- BorshCodec<
Properties
- byteLength → int
-
The number of bytes required to store
any
instance ofT
(i.e. max size).no setter -
decoder
→ BorshDecoder<
T> -
Returns the decoder of
this
, converting fromT
toS
.no setterinherited -
encoder
→ BorshEncoder<
T> -
Returns the encoder from
S
toT
.no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
-
inverted
→ Codec<
Iterable< int> , T> -
Inverts
this
.no setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cOption(
) → BorshOptionSizedCodec< T> -
Converts this codec to an c-option code of type
T
. -
decode(
Iterable< int> encoded) → T -
Decodes
encoded
data.inherited -
encode(
T input) → Iterable< int> -
Encodes
input
.inherited -
fuse<
R> (Codec< Iterable< other) → Codec<int> , R>T, R> -
Fuses
this
withother
.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
option(
) → BorshOptionSizedCodec< T> -
Converts this codec to an option code of type
T
. -
pack(
BufferWriter buffer, T input) → void -
Writes
input
tobuffer
.inherited -
size(
T input) → int -
Returns the serialized byte length of
input
.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
unpack(
BufferReader buffer) → T -
Reads
T
frombuffer
.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited