Verify that sidecar entry `i` actually corresponds to `field` by scanning the msgpack map. This is the hash-collision resolution path — only invoked when a hash matches, so the amortised cost is near-zero.
(msgpack: &[u8], value_offset: usize, value_len: usize, field: &str)
| 118 | /// the msgpack map. This is the hash-collision resolution path — only invoked |
| 119 | /// when a hash matches, so the amortised cost is near-zero. |
| 120 | fn verify_entry(msgpack: &[u8], value_offset: usize, value_len: usize, field: &str) -> bool { |
| 121 | match crate::msgpack_scan::field::extract_field(msgpack, 0, field) { |
| 122 | Some((start, end)) => start == value_offset && (end - start) == value_len, |
| 123 | None => false, |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | /// Build a sidecar-indexed document from raw msgpack bytes. |
| 128 | /// |
no test coverage detected