pub trait QuoteClassifiedIterator<'i, I: InputBlockIterator<'i, N>, const N: usize>: FallibleIterator<Item = QuoteClassifiedBlock<I::Block, N>, Error = InputError> {
// Required methods
fn get_offset(&self) -> usize;
fn offset(&mut self, count: isize);
fn flip_quotes_bit(&mut self);
}
Expand description
Trait for quote classifier iterators, i.e. finite iterators
enriching blocks of input with quote bitmasks.
Iterator is allowed to hold a reference to the JSON document valid for 'a
.
Required Methods§
sourcefn get_offset(&self) -> usize
fn get_offset(&self) -> usize
Get the total offset in bytes from the beginning of input.
sourcefn offset(&mut self, count: isize)
fn offset(&mut self, count: isize)
Move the iterator count
blocks forward.
Effectively skips count * Twice<BlockAlignment>::size()
bytes.
sourcefn flip_quotes_bit(&mut self)
fn flip_quotes_bit(&mut self)
Flip the bit representing whether the last block ended with a nonescaped quote.
This should be done only in very specific circumstances where the previous-block state could have been damaged due to stopping and resuming the classification at a later point.