Msgpax v1.1.0 Msgpax.Ext.Unpacker behaviour
Behaviour to unpack Msgpax.Ext structs into arbitrary terms.
Modules that implement this behaviour can be passed as the value of the :ext
option in Msgpax.unpack/2 and Msgpax.unpack_slice/2 (and their bang!
variants).
See the documentation for Msgpax.Ext for usage examples.
Summary
Callbacks
Invoked when unpacking the given extension
Callbacks
Specs
unpack(ext :: Msgpax.Ext.t) :: {:ok, any} | :error
Invoked when unpacking the given extension.
It should return {:ok, value} to have Msgpax return value when unpacking
the given extension, or :error if there’s an error while unpacking.