CAP never authorizes.
Caller-supplied ceilings for bounded protocol decoding.
Callers may narrow the defaults or widen them only as far as the compiled maximums. The values are pure data: no environment or application config is consulted.
Summary
Functions
The default bounded-decoding limits.
The closed limit-field set.
The greatest caller-selectable value for each limit.
Build caller-supplied limits, rejecting unknown or out-of-range values.
Whether a limits struct is complete and within the compiled maximums.
Types
@type t() :: %CharterAgreementProtocol.Limits{ max_array_items: non_neg_integer(), max_artifact_set_items: non_neg_integer(), max_bytes: non_neg_integer(), max_depth: non_neg_integer(), max_object_members: non_neg_integer(), max_string_bytes: non_neg_integer() }
Functions
@spec default() :: t()
The default bounded-decoding limits.
@spec fields() :: [atom()]
The closed limit-field set.
@spec maximums() :: t()
The greatest caller-selectable value for each limit.
@spec new(keyword()) :: {:ok, t()} | {:error, CharterAgreementProtocol.Error.t()}
Build caller-supplied limits, rejecting unknown or out-of-range values.
Whether a limits struct is complete and within the compiled maximums.