ReductionBounds.RpcTerm (ReductionBounds v0.1.0)

Copy Markdown View Source

A bounded message grammar distinct from Port iodata measures.

Reified terms are {:atom, string}, {:integer, integer}, {:binary, binary}, {:ref | :pid, natural}, :nil, {:cons, head, tail}, and tuples with the tags :tuple2, :tuple3, :tuple5. References/PIDs are abstract identities, not actual runtime values or evidence of freshness. Atoms are opaque symbols. Measures count tree nodes, total binary bytes and maximum integer magnitude bits independently; they do not describe ERTS representation or encoded size.

Summary

Functions

Reifies supported actual data, rejecting actual references/PIDs and unsupported types.

Types

t()

@type t() :: nil | tuple()

Functions

from_term(value)

@spec from_term(term()) :: {:ok, t()} | {:error, term()}

Reifies supported actual data, rejecting actual references/PIDs and unsupported types.

known?(size)

@spec known?(term()) :: boolean()

measure(term)

@spec measure(term()) :: {:ok, ReductionBounds.RpcTerm.Size.t()} | {:error, term()}

within?(actual, cap)