Struct rusterm::Console[][src]

pub struct Console {
    pub command_table: HashMap<String, Command>,
    pub prompt: String,
}
Expand description

The main constructor owning the console. It contains the command table and the prompt string.

Fields

command_table: HashMap<String, Command>

Used for aliasing function pointers with names to be looked up later when their alias is typed in to the prompt.

prompt: String

The characters that come before input, like >> or Console -> .

Implementations

Creates a new instance of the Console struct. It takes two arguments, the command table and the prompt string.

Runs the Read, Execute and Print Loop. It displays a prompt where the user can input the command they want, to then be read and parsed.

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

Performs the conversion.

Performs the conversion.

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.