BorshStringSizedCodec class

String Sized Codec

A codec for fixed-length string data types.

Inheritance
Mixed-in types

Constructors

BorshStringSizedCodec.new(int byteLength, {BufferEncoding? encoding})
Creates a codec for fixed-length string data types.
const

Properties

byteLength int
The number of bytes required to store any instance of T (i.e. max size).
final
decoder BorshStringSizedDecoder
Returns the decoder of this, converting from T to S.
no setteroverride
encoder BorshStringSizedEncoder
Returns the encoder from S to T.
no setteroverride
encoding BufferEncoding
The encoding.
final
hashCode int
The hash code for this object.
no setterinherited
inverted Codec<Iterable<int>, String>
Inverts this.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Operators

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