Type alias Serializer<T>

Serializer<T>: {
    description: string;
    serialize: ((value: T) => Buffer);
    deserialize: ((buffer: Buffer, offset?: number) => [T, number]);
}

Type Parameters

  • T

Type declaration

  • description: string
  • serialize: ((value: T) => Buffer)
      • (value: T): Buffer
      • Parameters

        • value: T

        Returns Buffer

  • deserialize: ((buffer: Buffer, offset?: number) => [T, number])
      • (buffer: Buffer, offset?: number): [T, number]
      • Parameters

        • buffer: Buffer
        • Optional offset: number

        Returns [T, number]

Generated using TypeDoc