pub trait Sandbox:
Default
+ 'static
+ Send {
// Required method
fn run_wasi(
&self,
ctx: &impl RuntimeContext,
) -> impl Future<Output = Result<i32>> + Send;
// Provided method
fn can_handle(
&self,
ctx: &impl RuntimeContext,
) -> impl Future<Output = Result<()>> + Send { ... }
}
Required Methods§
Provided Methods§
Sourcefn can_handle(
&self,
ctx: &impl RuntimeContext,
) -> impl Future<Output = Result<()>> + Send
fn can_handle( &self, ctx: &impl RuntimeContext, ) -> impl Future<Output = Result<()>> + Send
Check that the runtime can run the container. This checks runs after the container creation and before the container starts. By default it checks that the wasi_entrypoint is either:
- a OCI image with wasm layers
- a file with the
wasm
filetype header - a parsable
wat
file.
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.