pub trait InputBlockIterator<'i, const N: usize> {
type Block: InputBlock<'i, N>;
type Error: Into<InputError>;
// Required methods
fn next(&mut self) -> Result<Option<Self::Block>, Self::Error>;
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.
Sourcetype Error: Into<InputError>
type Error: Into<InputError>
Type of errors that can occur when reading from this iterator.
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.