Skip to main content

SandboxChild

Trait SandboxChild 

Source
pub trait SandboxChild {
    type Error: Error + 'static;

    // Required methods
    fn id(&self) -> u32;
    fn stdin(&mut self) -> Option<&mut dyn Write>;
    fn stdout(&mut self) -> Option<&mut dyn Read>;
    fn stderr(&mut self) -> Option<&mut dyn Read>;
    fn try_wait(&mut self) -> Result<Option<ExitStatus>, Self::Error>;
    fn wait(&mut self) -> Result<ExitStatus, Self::Error>;
    fn kill(&mut self) -> Result<(), Self::Error>;
}
Expand description

Common lifecycle operations for one native sandbox instance.

Required Associated Types§

Source

type Error: Error + 'static

The native lifecycle error type.

Required Methods§

Source

fn id(&self) -> u32

The native process or boundary identifier.

Source

fn stdin(&mut self) -> Option<&mut dyn Write>

Returns the piped standard input stream, if requested.

Source

fn stdout(&mut self) -> Option<&mut dyn Read>

Returns the piped standard output stream, if requested.

Source

fn stderr(&mut self) -> Option<&mut dyn Read>

Returns the piped standard error stream, if requested.

Source

fn try_wait(&mut self) -> Result<Option<ExitStatus>, Self::Error>

Checks for completion without waiting for the command.

Source

fn wait(&mut self) -> Result<ExitStatus, Self::Error>

Waits for completion while enforcing the prepared timeout policy.

Source

fn kill(&mut self) -> Result<(), Self::Error>

Terminates and confirms the complete sandbox boundary.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§