SnapshotSource

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 have access to all the persistent entries, including the archived entries. It also is allowed (but doesn’t have to) to return expired temporary 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§