pub trait StateBackend:
Send
+ Sync
+ 'static {
// Required methods
fn history(&self) -> &StoreHistory;
fn open(&self) -> StorageFuture<'_, RecoveryPosition>;
fn read_snapshot(
&self,
max_bytes: NonZeroUsize,
memory: RetainedMemory,
) -> StorageFuture<'_, Option<RecoverySnapshot>>;
fn write_snapshot(
&self,
snapshot: StorageBatch<RecoverySnapshot>,
) -> StorageFuture<'_, ()>;
fn read_entries<'a>(
&'a self,
after: &'a RecoveryPosition,
through: &'a RecoveryPosition,
limits: ReadLimits,
memory: RetainedMemory,
) -> StorageFuture<'a, RecoveryPage>;
fn write_entries(
&self,
entries: StorageBatch<RecoveryEntry>,
) -> StorageFuture<'_, ()>;
fn flush<'a>(
&'a self,
through: &'a RecoveryPosition,
) -> StorageFuture<'a, RecoveryPosition>;
fn close(&self) -> StorageFuture<'_, ()>;
}Required Methods§
fn history(&self) -> &StoreHistory
fn open(&self) -> StorageFuture<'_, RecoveryPosition>
fn read_snapshot( &self, max_bytes: NonZeroUsize, memory: RetainedMemory, ) -> StorageFuture<'_, Option<RecoverySnapshot>>
fn write_snapshot( &self, snapshot: StorageBatch<RecoverySnapshot>, ) -> StorageFuture<'_, ()>
fn read_entries<'a>( &'a self, after: &'a RecoveryPosition, through: &'a RecoveryPosition, limits: ReadLimits, memory: RetainedMemory, ) -> StorageFuture<'a, RecoveryPage>
fn write_entries( &self, entries: StorageBatch<RecoveryEntry>, ) -> StorageFuture<'_, ()>
fn flush<'a>( &'a self, through: &'a RecoveryPosition, ) -> StorageFuture<'a, RecoveryPosition>
fn close(&self) -> StorageFuture<'_, ()>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".