BorshStringCodec class
String Codec
A codec for string data types.
Constructors
- BorshStringCodec.new({int? lengthPadding, BufferEncoding? encoding})
-
Creates a codec for string data types.
const
Properties
- decoder → BorshStringDecoder
-
Returns the decoder of
this
, converting fromT
to S.no setteroverride - encoder → BorshStringEncoder
-
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 - lengthPadding → int
-
The number of zeros added to the end of the encoded length.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
decode(
Iterable< int> encoded) → String -
Decodes
encoded
data.inherited -
encode(
String input) → Iterable< int> -
Encodes
input
.inherited -
fuse<
R> (Codec< Iterable< other) → Codec<int> , R>String, R> -
Fuses
this
withother
.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pack(
BufferWriter buffer, String input) → void -
Writes
input
tobuffer
.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
frombuffer
.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited