Skip to main content

SandboxInstance

Trait SandboxInstance 

Source
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§

Source

fn eval( &mut self, evaluation: EvaluationId, source: String, ) -> Result<SandboxPending<String>, SandboxError>

Source

fn call( &mut self, evaluation: EvaluationId, callable: String, arguments_hta: Vec<u8>, ) -> Result<SandboxPending<Vec<u8>>, SandboxError>

Source

fn cancel(&mut self, evaluation: EvaluationId) -> Result<bool, SandboxError>

Source

fn active_evaluation(&self) -> Option<EvaluationId>

Source

fn state(&self) -> SandboxState

Source

fn error(&self) -> Option<SandboxError>

Source

fn close(&mut self) -> Result<(), SandboxError>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§