MOQX.Codec.Encoder protocol (moqx v0.10.0)

Copy Markdown View Source

Protocol for encoding typed values into payload iodata.

Implementations receive typed values and return iodata for that value's payload. Protocol-specific stream codecs decide when to call this protocol and own stream type prefixes, payload-size fields, buffering, and FIN handling.

Summary

Types

t()

All the types that implement this protocol.

Functions

Encodes a typed value into payload iodata.

Types

t()

@type t() :: term()

All the types that implement this protocol.

Functions

encode(value)

@spec encode(t()) :: iodata()

Encodes a typed value into payload iodata.