SkipLine

Trait SkipLine 

Source
pub trait SkipLine: Iterator {
    // Required methods
    fn skip_line(&mut self) -> Result<(), TextError>;
    fn skip_to(&mut self, byte_pos: usize) -> Result<(), TextError>;
}
Expand description

Extended Iterator that can skip over parts of the underlying data.

Required Methods§

Source

fn skip_line(&mut self) -> Result<(), TextError>

Set the iterator to the start of the next line.

Source

fn skip_to(&mut self, byte_pos: usize) -> Result<(), TextError>

Set the iterator to this byte-position.

This is a byte position for the underlying complete text, not an index into the iterated slice. Nevertheless, the byte_pos must not exceed the bounds of the slice.

May panic if this is not a char boundary. May panic if the offset is not within the slice-bounds.

Implementors§