pub trait ArtifactStore: Send + Sync {
// Required methods
fn persist<'life0, 'life1, 'async_trait>(
&'life0 self,
data: &'life1 [u8],
hint: ArtifactHint,
) -> Pin<Box<dyn Future<Output = Result<ArtifactRef, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn read<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
range: Option<Range<u64>>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Persistence port for tool artifacts — where oversized tool outputs are
spilled and read back. Callers persist raw bytes plus an ArtifactHint
and receive an ArtifactRef to embed in the result; concrete stores
are host concerns.
Required Methods§
Sourcefn persist<'life0, 'life1, 'async_trait>(
&'life0 self,
data: &'life1 [u8],
hint: ArtifactHint,
) -> Pin<Box<dyn Future<Output = Result<ArtifactRef, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn persist<'life0, 'life1, 'async_trait>(
&'life0 self,
data: &'life1 [u8],
hint: ArtifactHint,
) -> Pin<Box<dyn Future<Output = Result<ArtifactRef, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Stores data, tagged with hint, and returns the ArtifactRef
describing the persisted artifact.
Sourcefn read<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
range: Option<Range<u64>>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
range: Option<Range<u64>>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Reads back the bytes stored under id; an optional byte range bounds
the read.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".