LayoutSerializable class abstract

Abstract class for objects that can be serialized using a specific layout.

Implementers

Constructors

LayoutSerializable()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
layout → StructLayout
The layout representing the structure of the object for serialization.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
serialize() Map<String, dynamic>
Serializes the object to a map.
toBytes() List<int>
Converts the object to bytes using Borsh serialization.
toHex() String
Converts the object to a hexadecimal string.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

decode({required List<int> bytes, required StructLayout layout, Map<String, dynamic> validator = const {}}) Map<String, dynamic>
Decodes Borsh serialized bytes.