View Source Eventize.Serialization.Serializer behaviour (eventize v0.2.0)

Behaviour that specifies how events and snapshots can be serialized and deserialized.

Link to this section Summary

Link to this section Callbacks

Link to this callback

deserialize(input, type)

View Source
@callback deserialize(input :: binary(), type :: atom() | nil) ::
  {:ok, term()} | {:error, term()}
@callback serialize(input :: map()) :: {:ok, binary()} | {:error, term()}