pub trait RuntimeBackend: Send + Sync {
// Required methods
fn harness(&self) -> HarnessId;
fn capabilities(&self) -> RuntimeCapabilities;
fn start<'life0, 'async_trait>(
&'life0 self,
request: RuntimeStartRequest,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn RuntimeConnection>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn attach<'life0, 'async_trait>(
&'life0 self,
request: RuntimeAttachRequest,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn RuntimeConnection>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn attach_existing<'life0, 'async_trait>(
&'life0 self,
_request: RuntimeAttachRequest,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn RuntimeConnection>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Expand description
Factory for starting, resuming, and (where the native protocol permits it) joining one harness’s already-running runtime endpoint.
Required Methods§
Sourcefn capabilities(&self) -> RuntimeCapabilities
fn capabilities(&self) -> RuntimeCapabilities
Honest mechanical capability report.
Sourcefn start<'life0, 'async_trait>(
&'life0 self,
request: RuntimeStartRequest,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn RuntimeConnection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start<'life0, 'async_trait>(
&'life0 self,
request: RuntimeStartRequest,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn RuntimeConnection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create a fresh harness-native session.
Sourcefn attach<'life0, 'async_trait>(
&'life0 self,
request: RuntimeAttachRequest,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn RuntimeConnection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn attach<'life0, 'async_trait>(
&'life0 self,
request: RuntimeAttachRequest,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn RuntimeConnection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Resume a persisted harness-native session through a new protocol connection. This does not imply joining the process that originally wrote the session.
Provided Methods§
Sourcefn attach_existing<'life0, 'async_trait>(
&'life0 self,
_request: RuntimeAttachRequest,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn RuntimeConnection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn attach_existing<'life0, 'async_trait>(
&'life0 self,
_request: RuntimeAttachRequest,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn RuntimeConnection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Join an already-running harness process or server. Most stock harnesses cannot do this; adapters must opt in rather than silently treating a persisted resume as a live attach.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".