Skip to main content

LineStream

Trait LineStream 

Source
pub trait LineStream<'a> {
    // Required methods
    fn next_line(&mut self) -> Option<&'a str>;
    fn peek_line(&mut self) -> Option<&'a str>;
}
Expand description

Line source with peek for section detection (blank-line separators).

Implemented by the memchr cursor on the hot iterator path and by Peekable<I> for tests / ad-hoc callers.

Required Methods§

Source

fn next_line(&mut self) -> Option<&'a str>

Source

fn peek_line(&mut self) -> Option<&'a str>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, I> LineStream<'a> for Peekable<I>
where I: Iterator<Item = &'a str>,

Source§

fn next_line(&mut self) -> Option<&'a str>

Source§

fn peek_line(&mut self) -> Option<&'a str>

Implementors§

Source§

impl<'a> LineStream<'a> for MemchrLines<'a>