Skip to main content

SandboxProvider

Trait SandboxProvider 

Source
pub trait SandboxProvider:
    Send
    + Sync
    + Debug {
    // Required methods
    fn kind(&self) -> &str;
    fn capabilities(&self) -> ProviderCapabilities;
    fn create_sandbox<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        scope: &'life1 ResourceScope,
        request: &'life2 ProviderSandboxRequest,
        idempotency_key: &'life3 str,
    ) -> Pin<Box<dyn Future<Output = Result<ProviderResourceRef>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn stop_sandbox<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        external_id: &'life1 str,
        idempotency_key: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;

    // Provided methods
    fn validate_create(&self, _request: &ProviderSandboxRequest) -> Result<()> { ... }
    fn write_file<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
        &'life0 self,
        external_id: &'life1 str,
        path: &'life2 str,
        content: &'life3 [u8],
        expected_provider_revision: Option<&'life4 str>,
        idempotency_key: &'life5 str,
    ) -> Pin<Box<dyn Future<Output = Result<ProviderWriteResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait,
             'life5: 'async_trait { ... }
    fn exec_command<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        external_id: &'life1 str,
        command: &'life2 CommandSpec,
    ) -> Pin<Box<dyn Future<Output = Result<ProviderCommandOutput>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
}

Required Methods§

Source

fn kind(&self) -> &str

Source

fn capabilities(&self) -> ProviderCapabilities

Source

fn create_sandbox<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, scope: &'life1 ResourceScope, request: &'life2 ProviderSandboxRequest, idempotency_key: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<ProviderResourceRef>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source

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

Provided Methods§

Source

fn validate_create(&self, _request: &ProviderSandboxRequest) -> Result<()>

Source

fn write_file<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>( &'life0 self, external_id: &'life1 str, path: &'life2 str, content: &'life3 [u8], expected_provider_revision: Option<&'life4 str>, idempotency_key: &'life5 str, ) -> Pin<Box<dyn Future<Output = Result<ProviderWriteResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait,

Source

fn exec_command<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, external_id: &'life1 str, command: &'life2 CommandSpec, ) -> Pin<Box<dyn Future<Output = Result<ProviderCommandOutput>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§