Skip to main content

CliAdapter

Trait CliAdapter 

Source
pub trait CliAdapter: Send + Sync {
    // Required methods
    fn name(&self) -> CliName;
    fn run(
        &self,
        opts: &RunOptions,
        emit: &(dyn Fn(StreamEvent) + Send + Sync),
        cancel: CancellationToken,
    ) -> impl Future<Output = Result<RunResult>> + Send;
}
Expand description

Trait implemented by each CLI adapter.

Required Methods§

Source

fn name(&self) -> CliName

Source

fn run( &self, opts: &RunOptions, emit: &(dyn Fn(StreamEvent) + Send + Sync), cancel: CancellationToken, ) -> impl Future<Output = Result<RunResult>> + Send

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§