pub trait ReplCommandProcessor<C>: Debugwhere
    C: Parser,
{ fn process_command(&self, command: C) -> Result<()>; fn is_quit(&self, command: &str) -> bool; }

Required Methods§

source

fn process_command(&self, command: C) -> Result<()>

Process the supplied command which is a clap::Parser structure

source

fn is_quit(&self, command: &str) -> bool

Determine if the supplied command is a “quit” operation. This will be formatted into a trimmed string of lowercase letters. Example matching might check (in English)

fn is_quit(command: &str) -> bool {
 matches!(command, "quit" | "exit")
}

Implementors§