pub enum WireRejectionKind {
InputTooLarge,
DepthExceeded,
CollectionTooLarge,
VersionMismatch,
MalformedJson,
UnknownField,
UnknownVariant,
MissingField,
InvalidScalar,
TypeMismatch,
PolicyViolation,
}Expand description
Why an envelope never became a typed input. Every kind is fail-closed: nothing is decoded, nothing is staged, no state moves.
Variants§
InputTooLarge
Absolute byte boundary, enforced before parsing.
DepthExceeded
Absolute nesting boundary, enforced before parsing.
CollectionTooLarge
Absolute per-container entry boundary, enforced before parsing.
VersionMismatch
The revision marker is absent or is not the single supported revision.
MalformedJson
The bytes are not JSON at all.
UnknownField
A struct carried a field the contract does not define.
UnknownVariant
A tagged union carried a tag the contract does not define.
MissingField
A required field is absent.
InvalidScalar
A scalar broke a §7.1.1 rule (decimal u64, fixed-point ratio, finite float, branded id…).
TypeMismatch
A value had the wrong JSON type for its field.
PolicyViolation
The document decoded, but a value — or a relationship between values — breaks a contract rule: a cross-field invariant, an operation limit that would widen its bootstrap ceiling, a live patch that would grow a quota, a stale policy revision.
Distinct from Self::InvalidScalar on purpose. A scalar rejection means the bytes never
became a value and no host could have meant anything by them; a policy violation means the
host stated a coherent value the kernel refuses to adopt. The two need different host
handling — the first is a serialization bug, the second is a configuration decision — and
collapsing them makes “re-read and rebase this patch” indistinguishable from “your encoder
is broken”.
Implementations§
Trait Implementations§
Source§impl Clone for WireRejectionKind
impl Clone for WireRejectionKind
Source§fn clone(&self) -> WireRejectionKind
fn clone(&self) -> WireRejectionKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more