Skip to main content

Sandbox

Trait Sandbox 

Source
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§

Source

fn spawn<'a>( &'a self, cmd: &'a [&'a str], env: &'a [(String, String)], cwd: &'a Path, ) -> BoxFut<'a, Result<Output, RuntimeError>>

Source

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>>

Source

fn is_available(&self) -> bool

Source

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

Provided Methods§

Source

fn spawn_relaxed<'a>( &'a self, cmd: &'a [&'a str], env: &'a [(String, String)], cwd: &'a Path, ) -> BoxFut<'a, Result<Output, RuntimeError>>

Source

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".

Implementors§