Expand description
Canonical byte (de)serialization for Object.
Spec: docs/SPEC-OBJECTS.md. The byte layout produced here is the
v1 on-disk format; the golden-vector tests in tests/golden.rs pin
it byte-for-byte.
Every deserializer:
- Validates the 6-byte v1 prologue first.
- Enforces per-type bounds (entry counts, identity len, etc.).
- Rejects non-empty trailing bytes via
MkitError::TrailingData.
Functionsยง
- deserialize
- Deserialize bytes into an owned
Object. Validates the prologue and every per-type bound; rejects trailing data. - serialize
- Serialize an
Objectto its canonical byte form. Allocates fresh each call; the result is fully owned.