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
fn with_prefix<'b>(
&'b mut self,
prefix: &str
) -> Option<PrefixedExecutor<'a, 'b>>
&'b mut self,
prefix: &str
) -> Option<PrefixedExecutor<'a, 'b>>
Creates a new prefixed execution context, but only if the current line matches. Reduces the processing overhead for large tree command environments.
fn command<'b>(&'b mut self, cmd: &str) -> Option<CommandContext<'b>>
Announces a command to be executed. Returns an execution context in case the command is invoked.
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,
&'b mut self,
property_id: Id,
input_parser: P
) -> Option<PropertyContext<'b, V>> where
P: ValueInput<V>,
V: Display,
Announces a property that can be manipulated. Returns an execution context in case the property is to be either retrieved or updated.
Implementors
impl<'a> CliContext<'a> for CliExecutor<'a>
impl<'a, 'p> CliContext<'a> for PrefixedExecutor<'a, 'p>