Expand description
Read-time offset-integrity primitives.
View-open validation walks borrowed offset and value arrays
(check_offsets_monotonic, check_value_range,
check_offset_section) and converts already-validated indexes
infallibly (index_to_usize_validated, usize_to_index_validated).
Helpers return the small typed OffsetIntegrityIssue enum instead of
crate-specific error types; callers map the issue to their own typed error
at the boundary.
Enums§
- Offset
Integrity Issue - Reasons a borrowed offset or value array failed structural validation.
Functions§
- check_
offset_ section - Validates one offset section against
expected_countrows and a backing values array of lengthvalue_len. - check_
offsets_ monotonic - Verifies
offsets[0] == 0and thatoffsetsis non-decreasing. - check_
value_ range - Verifies every value in
valuesis less thanbound. - index_
to_ usize_ validated - Converts an already-validated index into
usize. - usize_
to_ index_ validated - Converts an already-validated
usizeslot into the target index width.