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§
Sourcefn 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 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}.
Sourcefn 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 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}.
Sourcefn 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 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}.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".