Skip to main content

ListCheckpointed

Trait ListCheckpointed 

Source
pub trait ListCheckpointed {
    // Required methods
    fn snapshot_state(&self) -> impl Future<Output = Vec<Vec<u8>>> + Send;
    fn restore_state(
        &self,
        state: Vec<Vec<u8>>,
    ) -> impl Future<Output = Result<()>> + Send;
}
Expand description

Trait for checkpointable list state.

Required Methods§

Source

fn snapshot_state(&self) -> impl Future<Output = Vec<Vec<u8>>> + Send

Get the current state as a list.

Source

fn restore_state( &self, state: Vec<Vec<u8>>, ) -> impl Future<Output = Result<()>> + Send

Restore state from a list.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§