Skip to main content

OldState

Trait OldState 

Source
pub trait OldState:
    Send
    + Sync
    + Debug {
    // Required methods
    fn range(&self) -> (u32, u32);
    fn version(
        &self,
        key: &[u8; 32],
        at: u32,
    ) -> Result<Option<(u32, Vec<u8>)>, String>;
}
Expand description

State before the snapshot, from another store: version with the same contract as StateStore::version, for ledgers in range.

Required Methods§

Source

fn range(&self) -> (u32, u32)

First and last ledger it can answer for.

Source

fn version( &self, key: &[u8; 32], at: u32, ) -> Result<Option<(u32, Vec<u8>)>, String>

The last version of key at or before at: ledger and object, empty if deleted there; None if it did not exist yet.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§