pub trait Source {
// Required methods
fn next_line(&mut self) -> Result<Option<Line>>;
fn label(&self) -> &str;
fn is_seekable(&self) -> bool;
}Expand description
A stream of input lines with 1-indexed line numbers.
Implementations own the underlying reader and handle newline stripping.
Required Methods§
Sourcefn label(&self) -> &str
fn label(&self) -> &str
A short label for this source, used for the filename prefix (- for stdin).
Sourcefn is_seekable(&self) -> bool
fn is_seekable(&self) -> bool
Can this source be paired with positional selectors?
false for stdin.