Struct jdn_cli::manager::CliManager [−][src]
A manager responsible for handling command line input and output.
Implementations
impl<R: BufRead, W: 'static + Write> CliManager<R, W>[src]
impl<R: BufRead, W: 'static + Write> CliManager<R, W>[src]pub fn with_reader_writer(reader: R, writer: W) -> CliManager<R, W>[src]
Constructs a new CliManager with the given read/write streams.
pub fn start(&mut self)[src]
Starts the command line interface. Note that this is a blocking operation; once this function returns, the user has submitted a request to stop the application (EXIT).
pub fn add_handler(&mut self, handler: Arc<dyn CliHandler>)[src]
Adds the given CliHandler. All commands returned by CliHandler::get_commands() will now be forwarded to this handler.
Arguments
handler - A reference to the handler to add. This reference is cloned for retention by the manager.
Trait Implementations
Auto Trait Implementations
impl<R, W> !RefUnwindSafe for CliManager<R, W>
impl<R, W> !Send for CliManager<R, W>
impl<R, W> !Sync for CliManager<R, W>
impl<R, W> Unpin for CliManager<R, W> where
R: Unpin,
W: Unpin,
R: Unpin,
W: Unpin,