pub trait QuoteClassifiedIterator<'a>: Iterator<Item = QuoteClassifiedBlock<'a>> + 'a {
    // Required methods
    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§

source

fn block_size() -> usize

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

source

fn is_empty(&self) -> bool

Returns whether the iterator is empty.

source

fn get_offset(&self) -> usize

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

source

fn offset(&mut self, count: isize)

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

source

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.

Implementors§