Trait Cli

Source
pub trait Cli: Sync + Send {
    // Required methods
    fn digest<'async_trait>(
        self: Arc<Self>,
        term: Arc<Terminal>,
        cmd: String,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn complete<'async_trait>(
        self: Arc<Self>,
        term: Arc<Terminal>,
        cmd: String,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<String>>>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn prompt(&self) -> Option<String>;

    // Provided method
    fn init(self: Arc<Self>, _term: &Arc<Terminal>) -> Result<()> { ... }
}

Required Methods§

Source

fn digest<'async_trait>( self: Arc<Self>, term: Arc<Terminal>, cmd: String, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,

Source

fn complete<'async_trait>( self: Arc<Self>, term: Arc<Terminal>, cmd: String, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<String>>>> + Send + 'async_trait>>
where Self: 'async_trait,

Source

fn prompt(&self) -> Option<String>

Provided Methods§

Source

fn init(self: Arc<Self>, _term: &Arc<Terminal>) -> Result<()>

Implementors§