pub trait StorageBackend: Send + Sync {
// Required methods
fn keyspace(
&self,
name: &str,
) -> Result<(String, Arc<dyn KeyspaceOps>), AppError>;
fn batch(&self) -> Box<dyn BatchOps>;
fn persist(
&self,
) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + Send + '_>>;
}Expand description
Factory: create keyspaces, create batches, persist/flush.
Required Methods§
fn keyspace( &self, name: &str, ) -> Result<(String, Arc<dyn KeyspaceOps>), AppError>
fn batch(&self) -> Box<dyn BatchOps>
fn persist( &self, ) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + Send + '_>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".