pub trait SandboxInstance {
// Required methods
fn eval(
&mut self,
evaluation: EvaluationId,
source: String,
) -> Result<SandboxPending<String>, SandboxError>;
fn call(
&mut self,
evaluation: EvaluationId,
callable: String,
arguments_hta: Vec<u8>,
) -> Result<SandboxPending<Vec<u8>>, SandboxError>;
fn cancel(&mut self, evaluation: EvaluationId) -> Result<bool, SandboxError>;
fn active_evaluation(&self) -> Option<EvaluationId>;
fn state(&self) -> SandboxState;
fn error(&self) -> Option<SandboxError>;
fn close(&mut self) -> Result<(), SandboxError>;
}Expand description
Provider-side live sandbox. Implementations own backend launch, execution, cancellation, and termination details.
Required Methods§
fn eval( &mut self, evaluation: EvaluationId, source: String, ) -> Result<SandboxPending<String>, SandboxError>
fn call( &mut self, evaluation: EvaluationId, callable: String, arguments_hta: Vec<u8>, ) -> Result<SandboxPending<Vec<u8>>, SandboxError>
fn cancel(&mut self, evaluation: EvaluationId) -> Result<bool, SandboxError>
fn active_evaluation(&self) -> Option<EvaluationId>
fn state(&self) -> SandboxState
fn error(&self) -> Option<SandboxError>
fn close(&mut self) -> Result<(), SandboxError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".