pub trait ReadLine {
// Required methods
fn read_line(&mut self) -> Result<String>;
fn clear_history(&mut self);
}Expand description
Generic input stream adapter trait, used for adding a proper line editor.
Comes with a generic implementation for all BufRead types.
Required Methods§
Sourcefn read_line(&mut self) -> Result<String>
fn read_line(&mut self) -> Result<String>
This is called once by every execution of the ? command within ADC.
ErrorKind::Interrupted causes ? to error, ErrorKind::UnexpectedEof makes an empty string, other ErrorKinds are returned early from the interpreter.
Sourcefn clear_history(&mut self)
fn clear_history(&mut self)
If Self has a history, clear it.