pub trait Sandbox: SandboxBackend {
type Child: SandboxChild<Error = Self::Error>;
type Error: Error + 'static;
// Required methods
fn prepare<'a>(
&self,
request: BackendRequest<'a>,
context: &PathResolutionContext,
) -> Result<PreparedBackendRequest<'a, Self>, Self::Error>
where Self: Sized;
fn spawn<'a>(
&self,
prepared: PreparedBackendRequest<'a, Self>,
) -> Result<Self::Child, Self::Error>
where Self: Sized;
}Expand description
Common preparation and process-launch contract for native Cageforge backends.
Required Associated Types§
Sourcetype Child: SandboxChild<Error = Self::Error>
type Child: SandboxChild<Error = Self::Error>
The native child handle returned by Self::spawn.
Required Methods§
Sourcefn prepare<'a>(
&self,
request: BackendRequest<'a>,
context: &PathResolutionContext,
) -> Result<PreparedBackendRequest<'a, Self>, Self::Error>where
Self: Sized,
fn prepare<'a>(
&self,
request: BackendRequest<'a>,
context: &PathResolutionContext,
) -> Result<PreparedBackendRequest<'a, Self>, Self::Error>where
Self: Sized,
Validates a command and effective policy against this backend.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".