pub trait Sandbox: Sized + Debug {
// Provided method
fn check_stack_guard(&self) -> Result<bool> { ... }
}
Expand description
The minimal functionality of a Hyperlight sandbox. Most of the types
and operations within this crate require Sandbox
implementations.
Sandbox
es include the notion of an ordering in a state machine.
For example, a given Sandbox
implementation may be the root node
in the state machine to which it belongs, and it may know how to “evolve”
into a next state. That “next state” may in turn know how to roll back
to the root node.
These transitions are expressed as EvolvableSandbox
and
DevolvableSandbox
implementations any Sandbox
implementation can
opt into.
Provided Methods§
Sourcefn check_stack_guard(&self) -> Result<bool>
fn check_stack_guard(&self) -> Result<bool>
Check to ensure the current stack cookie matches the one that was selected when the stack was constructed.
Return an Err
if there was an error inspecting the stack, Ok(false)
if there was no such error but the stack guard doesn’t match, and
Ok(true)
in the same situation where the stack guard does match.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.