Options
All
  • Public
  • Public/Protected
  • All
Menu

Class OptionLayout<T, P>

Type parameters

  • T

  • P

Hierarchy

  • Layout<T | null, P>
    • OptionLayout

Index

Constructors

  • Type parameters

    • T

    • P

    Parameters

    • layout: Layout<T, "">
    • Optional property: P

    Returns OptionLayout<T, P>

Properties

discriminator: Layout<number, "">
layout: Layout<T, "">
property?: P
span: number

Methods

  • decode(b: Buffer, offset?: number): null | T
  • Parameters

    • b: Buffer
    • offset: number = 0

    Returns null | T

  • encode(src: null | T, b: Buffer, offset?: number): number
  • Parameters

    • src: null | T
    • b: Buffer
    • offset: number = 0

    Returns number

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

    • b: Buffer
    • offset: number = 0

    Returns number

  • replicate<AP>(name: AP): Layout<null | T, AP>
  • Type parameters

    • AP: string

    Parameters

    • name: AP

    Returns Layout<null | T, AP>