pub trait SandboxBackend {
// Required methods
fn identity(&self) -> &BackendIdentity;
fn capabilities(&self) -> BackendCapabilities;
}Expand description
The capability-discovery contract implemented by a native backend.
Implementations advertise only capabilities they can enforce. Call
BackendRequest::prepare_for to run the common preflight; native
backends cannot replace that check with a broader capability set. Process
launch, platform I/O, and backend-specific errors remain outside this
trait. Prepared accessors reject a changed capability snapshot with a typed
error. The identity and capability checks do not prove that operating-system
enforcement exists.
Required Methods§
Sourcefn identity(&self) -> &BackendIdentity
fn identity(&self) -> &BackendIdentity
Returns the stable identity of this backend enforcement instance.
The same reference must be returned for the lifetime of the backend. Two instances may return the same identity only when they share the same enforcement state and capability contract.
Sourcefn capabilities(&self) -> BackendCapabilities
fn capabilities(&self) -> BackendCapabilities
Returns the capabilities this backend can enforce safely.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".