ArtifactService

Trait ArtifactService 

Source
pub trait ArtifactService: Send + Sync {
    // Required methods
    fn save<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session_id: &'life1 str,
        artifact: Artifact,
    ) -> Pin<Box<dyn Future<Output = Result<ArtifactMetadata, ArtifactError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn load<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        session_id: &'life1 str,
        name: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Artifact>, ArtifactError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn load_version<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        session_id: &'life1 str,
        name: &'life2 str,
        version: u32,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Artifact>, ArtifactError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn list<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ArtifactMetadata>, ArtifactError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn delete<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        session_id: &'life1 str,
        name: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), ArtifactError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Trait for artifact persistence — CRUD with versioning.

Artifacts are scoped by session ID and identified by name. Each update creates a new version.

Required Methods§

Source

fn save<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 str, artifact: Artifact, ) -> Pin<Box<dyn Future<Output = Result<ArtifactMetadata, ArtifactError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Save an artifact, creating a new version if it already exists.

Source

fn load<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 str, name: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Artifact>, ArtifactError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Load the latest version of an artifact.

Source

fn load_version<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 str, name: &'life2 str, version: u32, ) -> Pin<Box<dyn Future<Output = Result<Option<Artifact>, ArtifactError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Load a specific version of an artifact.

Source

fn list<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<ArtifactMetadata>, ArtifactError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List all artifact metadata for a session.

Source

fn delete<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 str, name: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<(), ArtifactError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Delete all versions of an artifact.

Implementors§