modewise_pipeline/
store.rs1use std::sync::Arc;
2
3use thiserror::Error;
4
5use crate::{Artifact, ArtifactKey};
6
7#[derive(Debug, Error)]
8#[error("artifact store failed: {0}")]
9pub struct StoreError(pub String);
10
11pub trait ArtifactStore: Send + Sync {
13 fn get(&self, key: &ArtifactKey) -> Result<Option<Arc<Artifact>>, StoreError>;
14 fn put(&self, key: &ArtifactKey, artifact: Arc<Artifact>) -> Result<(), StoreError>;
15 fn contains(&self, key: &ArtifactKey) -> Result<bool, StoreError>;
16}