Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PairSerializer<T, U>

Serializes [T, U] using serializers for T and U. This is slightly more efficient than DefaultSerializer, and it works with arbitrary T and U.

Type Parameters

  • T

  • U

Hierarchy

  • PairSerializer

Implements

Index

Constructors

Methods

  • deserialize(message: Uint8Array): [T, U]
  • Inverse of serialize.

    Typically, this returns a deep clone of the original value, not the same literal reference. Indeed, it is impossible to return the original reference on a different replica.

    Parameters

    • message: Uint8Array

    Returns [T, U]

  • serialize(value: [T, U]): Uint8Array

Generated using TypeDoc