Trait terminal_cli::CliContext [] [src]

pub trait CliContext<'a> {
    fn with_prefix<'b>(
        &'b mut self,
        prefix: &str
    ) -> Option<PrefixedExecutor<'a, 'b>>;
fn command<'b>(&'b mut self, cmd: &str) -> Option<CommandContext<'b>>;
fn property<'b, V, P, Id: Into<Cow<'b, str>>>(
        &'b mut self,
        property_id: Id,
        input_parser: P
    ) -> Option<PropertyContext<'b, V>>
    where
        P: ValueInput<V>,
        V: Display
; }

Required Methods

Creates a new prefixed execution context, but only if the current line matches. Reduces the processing overhead for large tree command environments.

Announces a command to be executed. Returns an execution context in case the command is invoked.

Announces a property that can be manipulated. Returns an execution context in case the property is to be either retrieved or updated.

Implementors