pub struct InMemoryArtifactService { /* private fields */ }Expand description
In-memory artifact service backed by DashMap for lock-free concurrent access.
Each artifact name can have multiple versions. Suitable for testing, prototyping, and single-process deployments. Data is lost on process restart.
Implementations§
Trait Implementations§
Source§impl ArtifactService for InMemoryArtifactService
impl ArtifactService for InMemoryArtifactService
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,
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,
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,
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,
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,
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.
Auto Trait Implementations§
impl Freeze for InMemoryArtifactService
impl !RefUnwindSafe for InMemoryArtifactService
impl Send for InMemoryArtifactService
impl Sync for InMemoryArtifactService
impl Unpin for InMemoryArtifactService
impl UnsafeUnpin for InMemoryArtifactService
impl UnwindSafe for InMemoryArtifactService
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more