Skip to main content

CommandExec

Trait CommandExec 

Source
pub trait CommandExec {
    // Required methods
    fn exec<CR>(
        &self,
        runner: &CR,
        service_name: &str,
        command: &Command,
        opts: &Exec,
    ) -> Result<()>
       where CR: CommandRunner;
    fn shell<CR>(
        &self,
        runner: &CR,
        service_name: &str,
        opts: &Exec,
    ) -> Result<()>
       where CR: CommandRunner;
}
Expand description

We implement exec with a trait so we can put it in its own module.

Required Methods§

Source

fn exec<CR>( &self, runner: &CR, service_name: &str, command: &Command, opts: &Exec, ) -> Result<()>
where CR: CommandRunner,

Exectute a command inside a running container. Even though we package up most of our arguments into structs, we still have a ridiculous number of arguments.

Source

fn shell<CR>(&self, runner: &CR, service_name: &str, opts: &Exec) -> Result<()>
where CR: CommandRunner,

Execute an interactive shell inside a running container.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§