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§
sourcefn block_size() -> usize
fn block_size() -> usize
Get size of a single quote classified block returned by this iterator.
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.