pub trait QuoteClassifiedIterator<'a>: Iterator<Item = QuoteClassifiedBlock<'a>> + 'a {
    fn block_size() -> usize;
    fn is_empty(&self) -> bool;
    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§

Get size of a single quote classified block returned by this iterator.

Returns whether the iterator is empty.

Get the total offset in bytes from the beginning of input.

Move the iterator count blocks forward. Effectively skips count * Twice<BlockAlignment>::size() bytes.

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.

Implementors§