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§
Sourcefn kind(&self) -> RuntimeKind
fn kind(&self) -> RuntimeKind
Runtime kind.
Sourcefn metadata(&self) -> RuntimeMetadata
fn metadata(&self) -> RuntimeMetadata
Static metadata.
Sourcefn capabilities(&self) -> RuntimeCapabilities
fn capabilities(&self) -> RuntimeCapabilities
Declared capabilities.
Sourcefn probe<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RuntimeStatus> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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).
Sourcefn 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 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.
Sourcefn 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,
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".