pub trait Shell: Send + Sync {
// Required methods
fn exec(
&self,
command: &str,
cwd: &Path,
timeout: Duration,
) -> Result<Output, String>;
fn describe(&self) -> String;
// Provided methods
fn exec_user(
&self,
command: &str,
cwd: &Path,
timeout: Duration,
) -> Result<Output, String> { ... }
fn available_binaries(
&self,
cwd: &Path,
candidates: &[&'static str],
) -> Vec<String> { ... }
}Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".