pub trait PersistentStorageProvider: Send + Sync {
// Required method
fn open_session(&self) -> StorageBackendResult<PersistentStorageSession>;
// Provided method
fn storage_identity(
&self,
) -> StorageBackendResult<Option<PersistentStorageIdentity>> { ... }
}Expand description
Factory for independent sessions over one durable database.
A provider owns the database-level resource while each returned session
owns its transaction state. This is the engine-facing extension point for
SQLite, redb, and application-defined Key/Value stores.
Required Methods§
fn open_session(&self) -> StorageBackendResult<PersistentStorageSession>
Provided Methods§
Sourcefn storage_identity(
&self,
) -> StorageBackendResult<Option<PersistentStorageIdentity>>
fn storage_identity( &self, ) -> StorageBackendResult<Option<PersistentStorageIdentity>>
Return the database identity shared by every session this provider opens. Custom providers that cannot expose a stable identity may keep the default; engines built from the same Arc provider still share an in-process coordinator.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".