Trait repl_rs::HelpViewer

source ·
pub trait HelpViewer {
    // Required methods
    fn help_general(&self, context: &HelpContext) -> Result<()>;
    fn help_command(&self, entry: &HelpEntry) -> Result<()>;
}
Expand description

Trait to be used if you want your own custom Help output

Required Methods§

source

fn help_general(&self, context: &HelpContext) -> Result<()>

Called when the plain help command is called with no arguments

source

fn help_command(&self, entry: &HelpEntry) -> Result<()>

Called when the help command is called with a command argument (i.e., help foo). Note that you won’t have to handle an unknown command - it’ll be handled in the caller

Implementors§