Struct calypso_repl::Command

source ·
pub struct Command<Ctx> {
    pub(crate) name: String,
    pub(crate) description: String,
    pub(crate) help: String,
    pub(crate) aliases: Vec<String>,
    pub(crate) eval: Eval<Ctx>,
}

Fields§

§name: String

The command’s name

§description: String

The description of the command

§help: String

The help description of the command

§aliases: Vec<String>

Aliases for this command

§eval: Eval<Ctx>

A closure that evaluates the command’s input (excluding the command name and leading space) and returns something implementing Display.

Implementations§

Extend the aliases vector

Add an alias

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.