Borsh class
Borsh serializer.
Properties
- boolean → BorshBoolCodec
-
Creates a
boolcodec.no setter - dateTime → BorshDateTimeCodec
-
Creates a
date timecodec.no setter - f32 → BorshFloat32Codec
-
Creates an
f32codec.no setter - f64 → BorshFloat64Codec
-
Creates an
f64codec.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- i128 → BorshInt128Codec
-
Creates an
i128codec.no setter - i16 → BorshInt16Codec
-
Creates an
i16codec.no setter - i32 → BorshInt32Codec
-
Creates an
i32codec.no setter - i64 → BorshInt64Codec
-
Creates an
i64codec.no setter - i8 → BorshInt8Codec
-
Creates an
i8codec.no setter - pubkey → BorshStringSizedCodec
-
Creates a base-58
public keycodec.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- u128 → BorshUint128Codec
-
Creates a
u128codec.no setter - u16 → BorshUint16Codec
-
Creates a
u16codec.no setter - u32 → BorshUint32Codec
-
Creates a
u32codec.no setter - u64 → BorshUint64Codec
-
Creates a
u64codec.no setter - u8 → BorshUint8Codec
-
Creates a
u8codec.no setter
Methods
-
array<
T> (BorshCodec< T> subtype, int length) → BorshArrayCodec<T> -
Creates an
arraycodec. -
arraySized<
T> (BorshCodecFixedSized< T> subtype, int length) → BorshArraySizedCodec<T> -
Creates an
arraycodec. -
buffer(
int length) → BorshBufferCodec -
Creates an
buffercodec. -
call(
BorshSchema schema) → BorshStructCodec -
Creates a
structcodec. -
decode(
BorshSchema schema, Iterable< int> input) → Map<String, dynamic> -
Decodes
inputusingschema. -
deserialize<
T extends BorshObjectMixin> (BorshSchema schema, Iterable< int> input, T decoder(Map<String, dynamic> )) → T -
Decodes
inputusingschemaand appliesdecoderto the result. -
encode(
BorshSchema schema, Map< String, dynamic> input) → Iterable<int> -
Encodes
inputusingschema. -
enumeration<
T extends Enum> (List< T> values, [int? byteLength]) → BorshEnumCodec<T> -
Creates an
enumcodec. -
list<
T> (BorshCodec< T> subtype, int length) → BorshListCodec<T> -
Creates an
arraycodec. -
map<
K, V> (BorshCodec< K> keyCodec, BorshCodec<V> valueCodec) → BorshMapCodec<K, V> -
Creates an
mapcodec. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pack(
BorshSchema schema, BufferWriter buffer, Map< String, dynamic> input) → void -
Encodes
inputusingschemaand writes the result tobuffer. -
rustEnumeration<
T> (List< BorshCodec< variants) → BorshRustEnumCodec<T> ?>T> -
Creates an
enumcodec for Rust style enums (tuple or struct constructors). -
rustEnumerationSized<
T> (List< BorshCodecFixedSized< variants) → BorshRustEnumSizedCodec<T> ?>T> -
Creates an
enumcodec for Rust style enums (tuple or struct constructors) for fixed size data types. -
rustString(
{int lengthPadding = ByteLength.u32, BufferEncoding? encoding}) → BorshStringCodec -
Creates a
stringcodec for Rust string types. -
serialize<
T extends BorshObjectMixin> (T input) → Iterable< int> -
Encodes
inputusing BorshObjectMixin.borshSchema. -
string(
{int? lengthPadding, BufferEncoding? encoding}) → BorshStringCodec -
Creates a
stringcodec. -
stringSized(
int length, {BufferEncoding? encoding}) → BorshStringSizedCodec -
Creates a
utf-8 stringcodec for a fixed length strings -
struct(
BorshSchema schema) → BorshStructCodec -
Creates a
structcodec. -
structSized(
BorshSchemaSized schema) → BorshStructSizedCodec -
Creates a
structcodec for fixed size data types. -
toString(
) → String -
A string representation of this object.
inherited
-
tuple(
List< BorshCodec> fields) → BorshTupleCodec -
Creates an
tuplecodec. -
tupleSized(
List< BorshCodecFixedSized> fields) → BorshTupleSizedCodec -
Creates an
tuplecodec for fixed size data types. -
unpack(
BorshSchema schema, BufferReader buffer) → Map< String, dynamic> -
Decodes
bufferusingschema. -
vec<
T> (BorshCodec< T> codec) → BorshVecCodec<T> -
Creates an
veccodec. -
vecSized<
T> (BorshCodecFixedSized< T> subtype, int capacity) → BorshVecSizedCodec<T> -
Creates an
veccodec.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited