Interface Serializable

Implement this interface so that you can use Args to serialize/de-serialize your objects.

The constructor of the class implementing this interface must have default value for each argument.

Example

const args = new Args().add(new Address(input)); // serialize
const address = args.nextSerializable(new Address()).unwrap();

Hierarchy

  • Serializable

Implemented by

Methods

  • Parameters

    • data: StaticArray<number>

      the serialized data

    • offset: number

      current offset

    Returns Result<number>

    the new offset wrapped in a Result

    Remarks

    it must modify the current object

    See

    nextSerializable

  • Returns StaticArray<number>

    the bytes

Generated using TypeDoc