Harald.Serializable behaviour (harald v0.3.0) View Source

Serializable behaviour.

Link to this section Summary

Functions

Asserts that bin will serialize symmetrically.

Link to this section Functions

Link to this macro

assert_symmetry(mod, bin)

View Source (macro)

Asserts that bin will serialize symmetrically.

If bin deserializes into {:ok, data}, data should serialize perfectly back into bin.

Link to this section Callbacks

Specs

deserialize(binary()) :: {:ok, term()} | {:error, term()}

Specs

serialize(term()) :: {:ok, binary()} | {:error, term()}