pub trait RemoteSandbox:
Send
+ Sync
+ Debug {
// Required method
fn execute<'a>(
&'a self,
language: &'a str,
code: &'a str,
inputs: Value,
limits: CodeLimits,
) -> BoxFuture<'a, Result<Value, NodeError>>;
// Provided method
fn execute_detailed<'a>(
&'a self,
language: &'a str,
code: &'a str,
inputs: Value,
limits: CodeLimits,
) -> BoxFuture<'a, Result<SandboxRun, NodeError>> { ... }
}Expand description
A sandbox that executes code out of process (for languages without an embedded engine).
Register it as Arc<dyn RemoteSandbox> in graphrt_core::Services.
Required Methods§
Provided Methods§
Sourcefn execute_detailed<'a>(
&'a self,
language: &'a str,
code: &'a str,
inputs: Value,
limits: CodeLimits,
) -> BoxFuture<'a, Result<SandboxRun, NodeError>>
fn execute_detailed<'a>( &'a self, language: &'a str, code: &'a str, inputs: Value, limits: CodeLimits, ) -> BoxFuture<'a, Result<SandboxRun, NodeError>>
Like RemoteSandbox::execute, also returning diagnostics (captured output,
limits that could not be applied). The default reports none.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".