Skip to main content

DeploymentStorage

Trait DeploymentStorage 

Source
pub trait DeploymentStorage: Send + Sync {
    // Required methods
    fn store<'life0, 'life1, 'async_trait>(
        &'life0 self,
        deployment_id: i64,
        path: &'life1 str,
        bytes: Bytes,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn retrieve<'life0, 'life1, 'async_trait>(
        &'life0 self,
        deployment_id: i64,
        path: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn remove<'life0, 'life1, 'async_trait>(
        &'life0 self,
        deployment_id: i64,
        path: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn list<'life0, 'async_trait>(
        &'life0 self,
        deployment_id: i64,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn remove_all<'life0, 'async_trait>(
        &'life0 self,
        deployment_id: i64,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Artifact storage abstraction for a deployment prefix.

All methods operate within the deployments/{deployment_id}/ key prefix. Bytes are opaque — no assumption is made about content type or structure.

§Unbounded size

Artifact size limits are a consumer/storage-tier concern and are not enforced by this trait.

Required Methods§

Source

fn store<'life0, 'life1, 'async_trait>( &'life0 self, deployment_id: i64, path: &'life1 str, bytes: Bytes, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Store bytes under {deployment_id}/{path}.

Source

fn retrieve<'life0, 'life1, 'async_trait>( &'life0 self, deployment_id: i64, path: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Retrieve bytes stored under {deployment_id}/{path}.

Source

fn remove<'life0, 'life1, 'async_trait>( &'life0 self, deployment_id: i64, path: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Remove a single artifact at {deployment_id}/{path}.

Source

fn list<'life0, 'async_trait>( &'life0 self, deployment_id: i64, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List all artifact paths under the deployment prefix.

Source

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

Remove all artifacts for a deployment (deletes the whole prefix).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§