pub trait ArtifactService: Send + Sync {
// Required methods
fn save<'life0, 'async_trait>(
&'life0 self,
req: SaveRequest,
) -> Pin<Box<dyn Future<Output = Result<SaveResponse, AdkError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn load<'life0, 'async_trait>(
&'life0 self,
req: LoadRequest,
) -> Pin<Box<dyn Future<Output = Result<LoadResponse, AdkError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn delete<'life0, 'async_trait>(
&'life0 self,
req: DeleteRequest,
) -> Pin<Box<dyn Future<Output = Result<(), AdkError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn list<'life0, 'async_trait>(
&'life0 self,
req: ListRequest,
) -> Pin<Box<dyn Future<Output = Result<ListResponse, AdkError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn versions<'life0, 'async_trait>(
&'life0 self,
req: VersionsRequest,
) -> Pin<Box<dyn Future<Output = Result<VersionsResponse, AdkError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
// Provided method
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), AdkError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
}Available on crate feature
artifacts only.Expand description
Trait for artifact storage backends.
Implementations must be thread-safe (Send + Sync) and support
versioned binary storage scoped by app, user, and session.
Required Methods§
Sourcefn save<'life0, 'async_trait>(
&'life0 self,
req: SaveRequest,
) -> Pin<Box<dyn Future<Output = Result<SaveResponse, AdkError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn save<'life0, 'async_trait>(
&'life0 self,
req: SaveRequest,
) -> Pin<Box<dyn Future<Output = Result<SaveResponse, AdkError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Store a binary artifact, returning the version that was written.
Sourcefn load<'life0, 'async_trait>(
&'life0 self,
req: LoadRequest,
) -> Pin<Box<dyn Future<Output = Result<LoadResponse, AdkError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn load<'life0, 'async_trait>(
&'life0 self,
req: LoadRequest,
) -> Pin<Box<dyn Future<Output = Result<LoadResponse, AdkError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Retrieve a stored artifact by filename and optional version.
Sourcefn delete<'life0, 'async_trait>(
&'life0 self,
req: DeleteRequest,
) -> Pin<Box<dyn Future<Output = Result<(), AdkError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn delete<'life0, 'async_trait>(
&'life0 self,
req: DeleteRequest,
) -> Pin<Box<dyn Future<Output = Result<(), AdkError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Delete an artifact (specific version or all versions).
Sourcefn list<'life0, 'async_trait>(
&'life0 self,
req: ListRequest,
) -> Pin<Box<dyn Future<Output = Result<ListResponse, AdkError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn list<'life0, 'async_trait>(
&'life0 self,
req: ListRequest,
) -> Pin<Box<dyn Future<Output = Result<ListResponse, AdkError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
List all artifact filenames in a session.
Sourcefn versions<'life0, 'async_trait>(
&'life0 self,
req: VersionsRequest,
) -> Pin<Box<dyn Future<Output = Result<VersionsResponse, AdkError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn versions<'life0, 'async_trait>(
&'life0 self,
req: VersionsRequest,
) -> Pin<Box<dyn Future<Output = Result<VersionsResponse, AdkError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
List all available versions of a specific artifact.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".