Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Structure<T, P, D>

Type parameters

  • T

  • P

  • D

Hierarchy

  • Structure<T, P, D>
    • Structure

Index

Constructors

  • new Structure<T, P, D>(): Structure<T, P, D>
  • new Structure<T, P, D>(fields: T, property?: P, decodePrefixes?: boolean): Structure<T, P, D>
  • Type parameters

    • T

    • P

    • D

    Returns Structure<T, P, D>

  • Type parameters

    • T

    • P

    • D

    Parameters

    • fields: T
    • Optional property: P
    • Optional decodePrefixes: boolean

    Returns Structure<T, P, D>

Properties

property?: P
span: number

Methods

  • decode(b: Buffer, offset?: number): D
  • override

    Parameters

    • b: Buffer
    • Optional offset: number

    Returns D

  • encode(src: D, b: Buffer, offset?: number): number
  • Parameters

    • src: D
    • b: Buffer
    • Optional offset: number

    Returns number

  • getSpan(b: Buffer, offset?: number): number
  • Parameters

    • b: Buffer
    • Optional offset: number

    Returns number

  • layoutFor<AP>(property: AP): Layout<D[AP], "">
  • Type parameters

    • AP: string

    Parameters

    • property: AP

    Returns Layout<D[AP], "">

  • offsetOf<AP>(property: AP): number
  • Type parameters

    • AP: string

    Parameters

    • property: AP

    Returns number

  • replicate<AP>(name: AP): Layout<D, AP>
  • Type parameters

    • AP: string

    Parameters

    • name: AP

    Returns Layout<D, AP>