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;
// Provided method
fn ui_call(
&self,
_method: &str,
_args: &Value,
) -> Option<Result<Value, String>> { ... }
}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§
fn run( &self, command: &str, stdin_input: Option<&str>, timeout_secs: u64, idle_timeout_secs: u64, cwd: &Path, ) -> CmdOutput
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".