Struct terminal_cli::CliExecutor
[−]
[src]
pub struct CliExecutor<'a> { /* fields omitted */ }
Helper for matching commands and properties against an input line.
Methods
impl<'a> CliExecutor<'a>
[src]
fn new<T: CharacterTerminalWriter>(
matcher: CliLineMatcher<'a>,
strings: &'a Strings,
terminal: &'a mut T
) -> Self
[src]
matcher: CliLineMatcher<'a>,
strings: &'a Strings,
terminal: &'a mut T
) -> Self
fn close(self) -> CliLineMatcher<'a>
[src]
Finish the execution of this line invocation.
fn get_terminal(&mut self) -> &mut CharacterTerminalWriter
[src]
Get the associated terminal.
Trait Implementations
impl<'a> CliContext<'a> for CliExecutor<'a>
[src]
fn with_prefix<'b>(
&'b mut self,
prefix: &str
) -> Option<PrefixedExecutor<'a, 'b>>
[src]
&'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. Read more
fn command<'b>(&'b mut self, cmd: &str) -> Option<CommandContext<'b>>
[src]
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,
[src]
&'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. Read more
impl<'a> Deref for CliExecutor<'a>
[src]
type Target = &'a mut CharacterTerminalWriter
The resulting type after dereferencing.
fn deref<'b>(&'b self) -> &'b &'a mut CharacterTerminalWriter
[src]
Dereferences the value.