Skip to main content

RuntimeAdapter

Trait RuntimeAdapter 

Source
pub trait RuntimeAdapter: Send + Sync {
    // Required methods
    fn kind(&self) -> RuntimeKind;
    fn metadata(&self) -> RuntimeMetadata;
    fn capabilities(&self) -> RuntimeCapabilities;
    fn probe<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = RuntimeStatus> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn execute<'life0, 'life1, 'async_trait>(
        &'life0 self,
        request: ExecutionRequest,
        policy: &'life1 SandboxPolicy,
    ) -> Pin<Box<dyn Future<Output = Result<ExecutionResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn restore<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        pir: &'life1 PirDocument,
        policy: &'life2 SandboxPolicy,
    ) -> Pin<Box<dyn Future<Output = Result<RestoreResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Trait implemented by language adapters.

Required Methods§

Source

fn kind(&self) -> RuntimeKind

Runtime kind.

Source

fn metadata(&self) -> RuntimeMetadata

Static metadata.

Source

fn capabilities(&self) -> RuntimeCapabilities

Declared capabilities.

Source

fn probe<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = RuntimeStatus> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Probe host availability (may spawn briefly).

Source

fn execute<'life0, 'life1, 'async_trait>( &'life0 self, request: ExecutionRequest, policy: &'life1 SandboxPolicy, ) -> Pin<Box<dyn Future<Output = Result<ExecutionResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Execute a program, optionally capturing bindings listed in the request.

Source

fn restore<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, pir: &'life1 PirDocument, policy: &'life2 SandboxPolicy, ) -> Pin<Box<dyn Future<Output = Result<RestoreResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Restore PIR bindings into a fresh worker context.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§