Skip to main content

SandboxProvider

Trait SandboxProvider 

Source
pub trait SandboxProvider<Ctx: Send + Sync>: Send + Sync {
    // Required methods
    fn sandbox_enabled(ctx: &Ctx) -> bool;
    fn workspace_root(ctx: &Ctx) -> Option<&PathBuf>;
}
Expand description

Provider trait for sandbox policy resolution.

Required Methods§

Source

fn sandbox_enabled(ctx: &Ctx) -> bool

Resolve the sandbox policy for the given context.

Source

fn workspace_root(ctx: &Ctx) -> Option<&PathBuf>

Get the workspace root enforced by the sandbox.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§