pub struct Repl<C>where
C: Parser,{ /* private fields */ }
Expand description
Represents the REPL interface and processing loop
Implementations§
source§impl<C> Repl<C>where
C: Parser,
impl<C> Repl<C>where
C: Parser,
sourcepub fn new(
command_processor: Box<dyn ReplCommandProcessor<C>>,
history_file: Option<String>,
prompt: Option<String>
) -> Result<Self>
pub fn new(
command_processor: Box<dyn ReplCommandProcessor<C>>,
history_file: Option<String>,
prompt: Option<String>
) -> Result<Self>
Construct a new REPL infterface.
You can supply the (optional) history file for command history. Utilizing rustyline we can utilize the history for up & down arrow navigation of past commands. Having the history file be null will be no history is loaded nor stored
history_file
- The optional command history file. Can be a full path, relative path, directory, or just the end filename to utilizeprompt
- The prompt to display to the user to enter input. Defaults to “>>”