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§

source

type Block: InputBlock<'i, N>

The type of blocks returned.

Required Methods§

source

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.

source

fn offset(&mut self, count: isize)

Offset the iterator by count full blocks forward.

The count parameter must be greater than 0.

Implementors§

source§

impl<'a, 'r, R: Read, IR, const N: usize> InputBlockIterator<'a, N> for BufferedInputBlockIterator<'a, 'r, R, IR, N>where IR: InputRecorder<BufferedInputBlock<N>>,

source§

impl<'a, 'r, const N: usize, R> InputBlockIterator<'a, N> for BorrowedBytesBlockIterator<'a, 'r, N, R>where R: InputRecorder<&'a [u8]> + 'r,

§

type Block = &'a [u8]