Trait irclap::IrclapContextMapper [] [src]

pub trait IrclapContextMapper {
    fn prepare_command_args<'a>(
        &'a self,
        args: Vec<&'a str>,
        msg: &'a Message
    ) -> Vec<Cow<'a, str>>; }

Provides a mapping between the context provided by an IRC message and the actual arguments needed to run a clap application. Also allows for special transformations to any arguments provided in the message.

Required Methods

Performs mapping from an original semi-parsed message to a full command.

args contains the arguments for the command, as parsed from the message content. In general, this is just the message split at whitespace, with the current nick of the bot stripped from the beginning.

Must return the full list of arguments to be parsed by clap::App.

Implementors