pub trait ModelStorage: Send + Sync {
// Required methods
fn store_artifacts<'life0, 'life1, 'async_trait>(
&'life0 self,
artifacts: &'life1 [Artifact],
) -> Pin<Box<dyn Future<Output = Result<Vec<Uuid>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_artifact<'life0, 'async_trait>(
&'life0 self,
artifact_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Artifact>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_artifacts<'life0, 'life1, 'async_trait>(
&'life0 self,
artifact_ids: &'life1 [Uuid],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn archive_version<'life0, 'async_trait>(
&'life0 self,
version_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_version<'life0, 'async_trait>(
&'life0 self,
version_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_artifacts<'life0, 'async_trait>(
&'life0 self,
version_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Artifact>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Storage backend trait for model artifacts
Required Methods§
Sourcefn store_artifacts<'life0, 'life1, 'async_trait>(
&'life0 self,
artifacts: &'life1 [Artifact],
) -> Pin<Box<dyn Future<Output = Result<Vec<Uuid>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn store_artifacts<'life0, 'life1, 'async_trait>(
&'life0 self,
artifacts: &'life1 [Artifact],
) -> Pin<Box<dyn Future<Output = Result<Vec<Uuid>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Store artifacts and return their IDs
Sourcefn get_artifact<'life0, 'async_trait>(
&'life0 self,
artifact_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Artifact>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_artifact<'life0, 'async_trait>(
&'life0 self,
artifact_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Artifact>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieve an artifact by ID
Sourcefn delete_artifacts<'life0, 'life1, 'async_trait>(
&'life0 self,
artifact_ids: &'life1 [Uuid],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_artifacts<'life0, 'life1, 'async_trait>(
&'life0 self,
artifact_ids: &'life1 [Uuid],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete artifacts by IDs
Sourcefn archive_version<'life0, 'async_trait>(
&'life0 self,
version_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn archive_version<'life0, 'async_trait>(
&'life0 self,
version_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Archive artifacts for a version