Fact.Seam.Decoder behaviour (Fact v0.2.1)
View SourceBehaviour defining how to decode stored records back into Elixir terms.
Implementations of this seam provide the logic for transforming a binary or iodata record retrieved from storage into a usable Elixir data structure.
Callback
decode/3– Decodes the given binaryvalueusing the seam instance. Accepts optional parameters viaopts. Returns{:ok, decoded}on success or{:error, reason}on failure.
Summary
Types
@type t() :: struct()
Callbacks
@callback default_options() :: map()
@callback family() :: atom()
@callback id() :: {atom(), non_neg_integer()}
@callback version() :: non_neg_integer()