BorshCodec<T> class
abstract
Codec
An interface for Borsh codecs.
- Inheritance
- Implementers
- BorshArrayTypedCodec
- BorshBigIntCodec
- BorshBigUintCodec
- BorshBoolCodec
- BorshBufferCodec
- BorshCodecFixedSized
- BorshDateTimeCodec
- BorshEnumCodec
- BorshFloatCodec
- BorshIntCodec
- BorshListCodec
- BorshMapCodec
- BorshOptionTypedCodec
- BorshRustEnumTypedCodec
- BorshStringBigInt
- BorshStringCodec
- BorshStringSizedCodec
- BorshStructTypedCodec
- BorshTupleTypedCodec
- BorshUintCodec
- BorshVecTypedCodec
Constructors
- BorshCodec.new()
-
Creates a codec for
T
data types.const
Properties
-
decoder
→ BorshDecoder<
T> -
Returns the decoder of
this
, converting fromT
to S.no setteroverride -
encoder
→ BorshEncoder<
T> -
Returns the encoder from S to
T
.no setteroverride - 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
-
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
-
pack(
BufferWriter buffer, T input) → void -
Writes
input
tobuffer
. -
size(
T input) → int -
Returns the serialized byte length of
input
. -
toString(
) → String -
A string representation of this object.
inherited
-
unpack(
BufferReader buffer) → T -
Reads
T
frombuffer
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited