Prerequisite (review #005 M2): Hash added to Endian/VariableEncoding
derives (additive; fieldless Eq enums), and to ByteRange.
- New public types LeafMeta { kind, encoding, endian } (Copy + Eq +
Hash) and OffsetEntry { range, meta } (start()/end() accessors),
re-exported from lib.rs. Deferred decision 2 resolved: struct —
get(path) -> Option<&OffsetEntry>, iter() -> (&str, &OffsetEntry).
Storage: Vec<(String, OffsetEntry)>.
- LeafMeta computed at compute time with effective endian threaded
through the aligned walk (container default -> field override,
propagated into nested-struct probes and array elements via the
referring field, matching the aligned materializer).
- engine read_field/write_field dispatch on the entry's LeafMeta:
the per-access BastDoc re-parse + lookup_leaf_field walk +
LeafFieldInfo are gone — the last two review #004 M1 sites.
- Parity note: lookup_leaf_field computed nested-struct defaults from
the nested struct's own endian annotation; the map now agrees with
the aligned materializer and packed ReadPlan (referring-field
propagation). The old divergence (nested struct declaring endian
under a field that also declares one) is closed; no test pinned it.
- Behavior change: read_field on a map-absent path (whole-struct
field) errors Offset ("field not found") instead of Access
("composite types"); the composite-path test accepted either.
- materialize_aligned's four offset_map.get call sites updated to
.range.start. alktty/alkcall untouched (bench never uses
OffsetMap::get; alkcall has no dependency yet).
Verification: 465 tests pass (offset_map tests updated to the
OffsetEntry shape with per-kind LeafMeta expectations; engine test
for the old lookup walk rewritten to assert map entries carry the
LeafMeta); clippy -D warnings clean; cargo doc zero warnings; wasm32
release build green.