Skip to main content

Sandbox

Trait Sandbox 

Source
pub trait Sandbox: Send + Sync {
    // Required method
    fn confine(&self, spec: ProcessSpec, policy: &SandboxPolicy) -> Confined;
}
Expand description

How a process is constrained.

A pure transformation, which is what makes it testable: it turns the command someone meant to run into the command that will actually run, and reports honestly how much of the policy survived. It does not execute anything — that is Process, and keeping them apart is what lets a caller inspect the confinement before committing to it.

Required Methods§

Source

fn confine(&self, spec: ProcessSpec, policy: &SandboxPolicy) -> Confined

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§