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