XmtpElixirSdk.Codec behaviour (xmtp_elixir_sdk v0.1.2)

Copy Markdown

Behaviour for custom content codecs.

Summary

Callbacks

content_type()

@callback content_type() :: XmtpElixirSdk.Types.ContentTypeId.t()

decode(term)

@callback decode(term()) :: {:ok, term()} | {:error, XmtpElixirSdk.Error.t()}

encode(term)

@callback encode(term()) :: {:ok, term()} | {:error, XmtpElixirSdk.Error.t()}