pub trait Input {
type Lines: Iterator;
type Line: AsRef<str>;
type Bytes: Iterator<Item = u8>;
// Required methods
fn lines(self) -> Self::Lines;
fn line(item: <Self::Lines as Iterator>::Item) -> Result<Self::Line, Error>;
fn bytes(line: Self::Line) -> Self::Bytes;
}Expand description
Types that can be passed to parsers as input.
The trait is implemented for &str, &[u8], BufReader,
and &mut B for every type B that implements BufRead.
When parsing a file, you can take a BufReader<File> as input.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.