pub trait StreamIn:
Send
+ Sync
+ UnwindSafe
+ RefUnwindSafe
+ Debug {
// Required methods
fn lock_bufread(&self) -> Box<dyn BufRead + '_>;
fn is_line_pipe(&self) -> bool;
fn lines(&self) -> Box<dyn NextLine + '_>;
}Expand description
A trait for readable streams.
Required Methods§
Sourcefn lock_bufread(&self) -> Box<dyn BufRead + '_>
fn lock_bufread(&self) -> Box<dyn BufRead + '_>
Locks the stream and returns a sync::MutexGuard object with a trait
io::BufRead.
Sourcefn is_line_pipe(&self) -> bool
fn is_line_pipe(&self) -> bool
Returns true if the stream is a line pipe.
Sourcefn lines(&self) -> Box<dyn NextLine + '_>
fn lines(&self) -> Box<dyn NextLine + '_>
Returns an iterator over the lines of the stream.
The iterator returned from this function will yield instances of
io::Result<String>. Each string returned will not have a newline
byte (the 0xA byte) or CRLF (0xD, 0xA bytes) at the end.
This behaves the same as std::io::BufRead::lines().