Count entries in a msgpack map.
(bytes: &[u8])
| 47 | |
| 48 | /// Count entries in a msgpack map. |
| 49 | fn count_map_entries(bytes: &[u8]) -> usize { |
| 50 | msgpack_scan::map_header(bytes, 0).map_or(0, |(count, _)| count) |
| 51 | } |
| 52 | |
| 53 | /// Write a msgpack map header. |
| 54 | pub fn write_map_header(buf: &mut Vec<u8>, len: usize) { |
no test coverage detected