Skip to main content

RemoteRunnerSession

Trait RemoteRunnerSession 

Source
pub trait RemoteRunnerSession:
    Send
    + Sync
    + 'static {
Show 13 methods // Required methods fn state(&self) -> RunnerSessionState; fn run_command<'life0, 'async_trait>( &'life0 self, request: RunnerCommandRequest, ) -> Pin<Box<dyn Future<Output = Result<RunnerCommandResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn read_file<'life0, 'async_trait>( &'life0 self, request: RunnerFileReadRequest, ) -> Pin<Box<dyn Future<Output = Result<RunnerFileReadResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn write_file<'life0, 'async_trait>( &'life0 self, request: RunnerFileWriteRequest, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn expose_port<'life0, 'async_trait>( &'life0 self, request: RunnerPortRequest, ) -> Pin<Box<dyn Future<Output = Result<RunnerPortResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn snapshot<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<RunnerSnapshotRef>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn close<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; // Provided methods fn acquire_workspace_execution_lease<'life0, 'async_trait>( &'life0 self, _request: RunnerWorkspaceExecutionLeaseRequest, ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn RemoteWorkspaceExecutionLease>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn pause<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<RunnerSessionState>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn resume<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<RunnerSessionState>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn detach<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<RunnerSessionState>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn cancel_command<'life0, 'life1, 'async_trait>( &'life0 self, _command_id: &'life1 RunnerCommandId, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn export_artifact<'life0, 'async_trait>( &'life0 self, _request: RunnerArtifactExportRequest, ) -> Pin<Box<dyn Future<Output = Result<RunnerArtifactExportResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... }
}

Required Methods§

Source

fn state(&self) -> RunnerSessionState

Source

fn run_command<'life0, 'async_trait>( &'life0 self, request: RunnerCommandRequest, ) -> Pin<Box<dyn Future<Output = Result<RunnerCommandResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn read_file<'life0, 'async_trait>( &'life0 self, request: RunnerFileReadRequest, ) -> Pin<Box<dyn Future<Output = Result<RunnerFileReadResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn write_file<'life0, 'async_trait>( &'life0 self, request: RunnerFileWriteRequest, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn expose_port<'life0, 'async_trait>( &'life0 self, request: RunnerPortRequest, ) -> Pin<Box<dyn Future<Output = Result<RunnerPortResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn snapshot<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<RunnerSnapshotRef>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

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

Provided Methods§

Source

fn acquire_workspace_execution_lease<'life0, 'async_trait>( &'life0 self, _request: RunnerWorkspaceExecutionLeaseRequest, ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn RemoteWorkspaceExecutionLease>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

  • Optionally acquire a provider-authoritative fence around a complete
  • workspace tool execution. This complements the runtime’s in-process
  • session mutex for providers whose durable workspaces can be reached by
  • multiple runtimes or replicas.
  • Providers without a cross-process fence return None; they retain the
  • runtime-local serialization behavior. Acquisition must be cancellation
  • safe: if this future is dropped at the requested timeout, it must not
  • leave an authoritative remote fence orphaned without its finite
  • server-side expiry.
Source

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

  • Move the session toward a paused/standby state to save cost. Default is a
  • no-op for providers that do not support pausing
  • (RunnerCapabilities::pausable == false). Returns the post-pause state.
Source

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

  • Wake a paused/standby session so subsequent commands run immediately.
  • Default is a no-op. Returns the post-resume state.
Source

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

  • Release the local session handle while keeping the remote sandbox alive
  • for a later rejoin_session. Returns the durable state that callers must
  • persist to rejoin. Default errors for providers that are not detachable.
Source

fn cancel_command<'life0, 'life1, 'async_trait>( &'life0 self, _command_id: &'life1 RunnerCommandId, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn export_artifact<'life0, 'async_trait>( &'life0 self, _request: RunnerArtifactExportRequest, ) -> Pin<Box<dyn Future<Output = Result<RunnerArtifactExportResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§