pub trait CliContext<'a> {
// Required methods
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§
Sourcefn with_prefix<'b>(
&'b mut self,
prefix: &str,
) -> Option<PrefixedExecutor<'a, 'b>>
fn with_prefix<'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.
Sourcefn command<'b>(&'b mut self, cmd: &str) -> Option<CommandContext<'b>>
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.
Sourcefn 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,
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,
Announces a property that can be manipulated. Returns an execution context in case the property is to be either retrieved or updated.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.