0.3.17-pre.002
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-store-api/src/capability.rs
|
||||
// version: 3
|
||||
// version: 4
|
||||
|
||||
//! Private home for backend-agnostic Store capability contracts.
|
||||
//!
|
||||
@@ -9,6 +9,7 @@
|
||||
//! outside `ksp-store-api`.
|
||||
|
||||
pub(crate) mod raw_account;
|
||||
pub(crate) mod raw_conflict;
|
||||
pub(crate) mod raw_retention;
|
||||
pub(crate) mod raw_transaction;
|
||||
|
||||
@@ -17,3 +18,12 @@ pub(crate) mod raw_transaction;
|
||||
/// The alias uses only standard-library primitives so backend implementations
|
||||
/// need no async helper dependency merely to implement `ksp-store-api`.
|
||||
pub type StoreApiFuture<'a, T> = std::pin::Pin<std::boxed::Box<dyn std::future::Future<Output = T> + std::marker::Send + 'a>>;
|
||||
|
||||
/// Backend-neutral classifier for errors crossing a Store capability boundary.
|
||||
///
|
||||
/// Implementations must classify from structured KSP error state. Consumers such
|
||||
/// as Workers must not infer retryability by matching backend-specific strings.
|
||||
pub trait StoreErrorClassifier: std::marker::Send + std::marker::Sync {
|
||||
/// Classifies one already-redacted Store error as retryable/transient or terminal.
|
||||
fn classify_store_error(&self, error: &crate::Error) -> crate::StoreErrorClass;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user