Skip to main content

ShellBackend

Trait ShellBackend 

Source
pub trait ShellBackend: Send + Sync {
    // Required methods
    fn run(
        &self,
        command: &str,
        stdin_input: Option<&str>,
        timeout_secs: u64,
        idle_timeout_secs: u64,
        cwd: &Path,
    ) -> CmdOutput;
    fn kind(&self) -> &'static str;
}
Expand description

A command execution backend. cwd is the working directory; timeout_secs of 0 means “no explicit total timeout”. idle_timeout_secs of 0 disables idle timeout (currently only enforced by NativeShell, ignored by FastshellBackend).

Required Methods§

Source

fn run( &self, command: &str, stdin_input: Option<&str>, timeout_secs: u64, idle_timeout_secs: u64, cwd: &Path, ) -> CmdOutput

Source

fn kind(&self) -> &'static str

Human-readable backend name (for diagnostics).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§