Skip to main content

ModelStorage

Trait ModelStorage 

Source
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§

Source

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

Source

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

Source

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

Source

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

Source

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,

Delete all artifacts for a version

Source

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,

List all artifacts for a version

Implementors§