commanded v0.10.0 Commanded.EventStore.Serializer behaviour

Specification of a serializer to convert between an Elixir term and binary data.

Summary

Callbacks

Deserialize the given binary data to the corresponding term

Serialize the given term to a binary representation

Types

config()
config() :: Keyword.t
t()
t() :: module

Callbacks

deserialize(binary, config)
deserialize(binary, config) :: any

Deserialize the given binary data to the corresponding term

serialize(any)
serialize(any) :: binary

Serialize the given term to a binary representation