Advance past the MessagePack value starting at `offset`, returning the offset of the next value. Returns `None` if the buffer is truncated or nesting exceeds `MAX_DEPTH`. This is the performance-critical primitive. It never allocates.
(buf: &[u8], offset: usize)
| 86 | /// |
| 87 | /// This is the performance-critical primitive. It never allocates. |
| 88 | pub fn skip_value(buf: &[u8], offset: usize) -> Option<usize> { |
| 89 | skip_value_depth(buf, offset, 0) |
| 90 | } |
| 91 | |
| 92 | fn skip_value_depth(buf: &[u8], offset: usize, depth: u16) -> Option<usize> { |
| 93 | if depth > MAX_DEPTH { |