pub struct Buffers { /* private fields */ }Expand description
A struct to hold the buffers for the parser.
Implementations§
Source§impl Buffers
impl Buffers
Sourcepub fn structural_indexes(&self) -> &[u32]
pub fn structural_indexes(&self) -> &[u32]
Borrow the byte offsets of every JSON structural character produced by
stage-1 SIMD scanning. Populated as a side effect of any parse path
that takes &mut Buffers (to_tape_with_buffers,
Deserializer::from_slice_with_buffers, etc.).
The returned slice is valid until the next parse call that reuses these buffers. Useful for downstream tooling that wants to align its own column indices against simd-json’s structural decisions without running stage-1 a second time.
Sourcepub fn new(input_len: usize) -> Self
pub fn new(input_len: usize) -> Self
Create new buffer for input length. If this is too small a new buffer will be allocated, if needed during parsing.
Sourcepub fn with_max_depth(input_len: usize, max_depth: usize) -> Self
pub fn with_max_depth(input_len: usize, max_depth: usize) -> Self
Create new buffer for input length with a custom maximum nesting depth. If this is too small a new buffer will be allocated, if needed during parsing.