Decoder<T> typedef

Decoder<T> = T Function(Unpacker unpacker, int length)

Decodes bytes into a value of type T.

The unpacker parameter allows reading custom decoding logic directly from the stream. length is the byte length of the extension payload.

Implementation

typedef Decoder<T> = T Function(Unpacker unpacker, int length);