CommandExecutor

Trait CommandExecutor 

Source
pub trait CommandExecutor: Sized {
    // Required method
    fn execute_from_path(
        self,
        manifest_path: PathBuf,
    ) -> impl Future<Output = Result<()>> + Send;

    // Provided method
    fn execute(self) -> impl Future<Output = Result<()>> + Send
       where Self: Send { ... }
}
Expand description

Common trait for CLI command execution pattern

Required Methods§

Source

fn execute_from_path( self, manifest_path: PathBuf, ) -> impl Future<Output = Result<()>> + Send

Execute the command with a specific manifest path

Provided Methods§

Source

fn execute(self) -> impl Future<Output = Result<()>> + Send
where Self: Send,

Execute the command, finding the manifest automatically

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§