Skip to main content

SubstrateClient

Trait SubstrateClient 

Source
pub trait SubstrateClient: Send + Sync {
    // Required methods
    fn create_workspace<'life0, 'life1, 'async_trait>(
        &'life0 self,
        spec: &'life1 SubstrateWorkspaceSpec,
    ) -> Pin<Box<dyn Future<Output = Result<SubstrateWorkspace>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn workspace_status<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<SubstrateStatus>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn delete_workspace<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn stop_workspace<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

The substrate boundary, injectable for tests — the minimal Coder-shaped surface the adapter drives (see the module docs for the wire mapping CoderHttpClient uses). No VM scheduling semantics cross this trait: the substrate owns images, placement, and hibernation economics.

Required Methods§

Source

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

Create (and start) one workspace from a pinned template, injecting the named secrets — NAMES only, never values.

Source

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

The workspace’s current lifecycle state.

Source

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

Release the workspace entirely (TeardownMode::Destroy).

Source

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

Provider-owned idle suspension (TeardownMode::Hibernate).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§