pub trait ShellExecutor: Send + Sync {
// Required method
fn build_command(
&self,
shell: &str,
flag: &str,
command: &str,
workdir: &Path,
) -> Command;
}Expand description
Redirects shell command execution off the host into a sandbox.
The default (no executor) runs the command directly on the host - the exact
prior behavior. An implementor (the daemon’s SandboxManager) returns a
tokio::process::Command that runs command inside a container or Linux
namespace instead. The implementor owns any per-stage sandbox state, so the
same handle is used for the agent’s whole life; only shell execution is
affected (file tools stay on the host, over the bind-mounted workdir).
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".