Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BeetArgsStruct<Args>

Convenience wrapper around BeetStruct which is used for plain JavasScript objects, like are used for option args passed to functions.

Type Parameters

  • Args

Hierarchy

Index

Constructors

Properties

byteSize: number
description: string = BeetStruct.description
fields: FixedBeetField<Args>[]
TYPE: string = 'BeetStruct'
description: string = 'BeetArgsStruct'

Accessors

  • get type(): string
  • Returns string

Methods

  • deserialize(buffer: Buffer, offset?: number): [Args, number]
  • Deserializes an instance of the Class from the provided buffer starting to read at the provided offset.

    Parameters

    • buffer: Buffer
    • offset: number = 0

    Returns [Args, number]

    [instance of Class, offset into buffer after deserialization completed]

  • serialize(instance: Args, byteSize?: number): [Buffer, number]
  • Serializes the provided instance into a new {@link Buffer}

    Parameters

    • instance: Args

      of the struct to serialize

    • byteSize: number = ...

      allows to override the size fo the created Buffer and defaults to the size of the struct to serialize

    Returns [Buffer, number]

Generated using TypeDoc