pub trait Sandbox: Send + Sync {
// Required methods
fn spawn<'a>(
&'a self,
cmd: &'a [&'a str],
env: &'a [(String, String)],
cwd: &'a Path,
) -> BoxFut<'a, Result<Output, RuntimeError>>;
fn spawn_pty<'a>(
&'a self,
cmd: &'a [&'a str],
env: &'a [(String, String)],
cwd: &'a Path,
pty_size: PtySize,
) -> BoxFut<'a, Result<PtySpawnResult, RuntimeError>>;
fn is_available(&self) -> bool;
fn kind(&self) -> &'static str;
// Provided methods
fn spawn_relaxed<'a>(
&'a self,
cmd: &'a [&'a str],
env: &'a [(String, String)],
cwd: &'a Path,
) -> BoxFut<'a, Result<Output, RuntimeError>> { ... }
fn spawn_pty_relaxed<'a>(
&'a self,
cmd: &'a [&'a str],
env: &'a [(String, String)],
cwd: &'a Path,
pty_size: PtySize,
) -> BoxFut<'a, Result<PtySpawnResult, RuntimeError>> { ... }
}Required Methods§
fn spawn<'a>( &'a self, cmd: &'a [&'a str], env: &'a [(String, String)], cwd: &'a Path, ) -> BoxFut<'a, Result<Output, RuntimeError>>
fn spawn_pty<'a>( &'a self, cmd: &'a [&'a str], env: &'a [(String, String)], cwd: &'a Path, pty_size: PtySize, ) -> BoxFut<'a, Result<PtySpawnResult, RuntimeError>>
fn is_available(&self) -> bool
fn kind(&self) -> &'static str
Provided Methods§
fn spawn_relaxed<'a>( &'a self, cmd: &'a [&'a str], env: &'a [(String, String)], cwd: &'a Path, ) -> BoxFut<'a, Result<Output, RuntimeError>>
fn spawn_pty_relaxed<'a>( &'a self, cmd: &'a [&'a str], env: &'a [(String, String)], cwd: &'a Path, pty_size: PtySize, ) -> BoxFut<'a, Result<PtySpawnResult, RuntimeError>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".