Continuum.DurableTerm (continuum v0.6.2)

Copy Markdown View Source

Validates values before they cross a Continuum journal boundary.

ETF can encode node-local identities, but decoding them during replay does not make them meaningful on another process or node. This validator rejects those identities recursively and reports their exact location.

Summary

Types

path()

@type path() :: [path_segment()]

path_segment()

@type path_segment() ::
  atom() | {:field, term()} | {:index, non_neg_integer()} | :tail

Functions

validate(term, root \\ :value)

@spec validate(term(), atom()) :: :ok | {:error, Continuum.DurableTermError.t()}

validate!(term, root \\ :value)

@spec validate!(term(), atom()) :: term()