Skip to main content

StateBackend

Trait StateBackend 

Source
pub trait StateBackend:
    Send
    + Sync
    + 'static {
    // Required methods
    fn history(&self) -> &StoreHistory;
    fn open(&self) -> StorageFuture<'_, RecoveryPosition>;
    fn read_snapshot(
        &self,
        max_bytes: NonZeroUsize,
    ) -> 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,
    ) -> 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§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§