Fact.Seam.Encoder behaviour (Fact v0.2.1)
View SourceBehaviour defining how to encode records before they are written to storage.
Implementations of this seam provide the logic for transforming a record into a binary or iodata format suitable for persistence.
Callback
encode/3– Encodes the given record using the seam instance. Accepts optional parameters viaopts. Returns{:ok, iodata()}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()