soroban_env_host::storage

Trait SnapshotSource

Source
pub trait SnapshotSource {
    // Required method
    fn get(
        &self,
        key: &Rc<LedgerKey>,
    ) -> Result<Option<EntryWithLiveUntil>, HostError>;
}
Expand description

A helper type used by FootprintMode::Recording to provide access to a stable read-snapshot of a ledger. The snapshot is expected to only return live ledger entries.

Required Methods§

Source

fn get( &self, key: &Rc<LedgerKey>, ) -> Result<Option<EntryWithLiveUntil>, HostError>

Returns the ledger entry for the key and its live_until ledger if entry exists, or None otherwise.

Implementors§