Actionable

Trait Actionable 

Source
pub trait Actionable {
    type Command: Parser;

    // Required method
    fn act_on(&mut self, cmd: &Self::Command) -> Result<bool>;

    // Provided method
    fn try_parse_from<I, T>(iter: I) -> Result<Self::Command>
       where I: IntoIterator<Item = T>,
             T: Into<OsString> + Clone { ... }
}
Expand description

Defines actions for REPL commands

Required Associated Types§

Required Methods§

Source

fn act_on(&mut self, cmd: &Self::Command) -> Result<bool>

Take action on REPL commands. Return Ok(true) will exit shell loop.

Provided Methods§

Source

fn try_parse_from<I, T>(iter: I) -> Result<Self::Command>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

parse Command from shell line input.

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.

Implementors§