BorshStruct class

Struct

An annotation for borsh serializable objects with sized properties.

The fields must be given in class property order.

@BorshSerializable()
class AClass {
  const AClass(this.x, this.y);
  final int x;
  final int y;
}

@BorshSerializable()
class BClass {
  const BClass(this.property);
  @BorshStructSized({
    'x': BorshInt64(),
    'y': BorshInt64(),
  })
  final AClass property;
}
Inheritance

Constructors

BorshStruct.new(Map<String, BorshAnnotation> schema)
Creates an annotation for borsh serializable objects.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schema Map<String, BorshAnnotation>
The ordered field annotations.
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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