Trait rsonpath::input::InputBlockIterator
source · pub trait InputBlockIterator<'i, const N: usize>: FallibleIterator<Item = Self::Block, Error = InputError> {
type Block: InputBlock<'i, N>;
// Required methods
fn get_offset(&self) -> usize;
fn offset(&mut self, count: isize);
}
Expand description
An iterator over blocks of input of size N
.
Implementations MUST guarantee that the blocks returned from next
are exactly of size N
.
Required Associated Types§
sourcetype Block: InputBlock<'i, N>
type Block: InputBlock<'i, N>
The type of blocks returned.
Required Methods§
sourcefn get_offset(&self) -> usize
fn get_offset(&self) -> usize
Get the offset of the iterator in the input.
The offset is the starting point of the block that will be returned next
from this iterator, if any. It starts as 0 and increases by N
on every
block retrieved.