Pristine.Ports.Serializer behaviour (Pristine v0.3.0)

Copy Markdown View Source

Serialization boundary for request/response payloads.

Summary

Callbacks

decode(binary, arg2, keyword)

@callback decode(binary(), term() | nil, keyword()) :: {:ok, term()} | {:error, term()}

encode(term, keyword)

@callback encode(term(), keyword()) :: {:ok, binary()} | {:error, term()}