Skip to main content

StorageLockedView

Trait StorageLockedView 

Source
pub trait StorageLockedView: Send + Sync {
    // Required method
    fn get(&self, key: &[u8]) -> Result<Option<Vec<u8>>, StoreError>;
}
Expand description

Locked snapshot interface for batch read operations. Provides read-only access to a specific table with a persistent snapshot. This is optimized for scenarios where many reads are performed on the same table, such as trie traversal operations. This is currently only used in snapsync stage.

Required Methods§

Source

fn get(&self, key: &[u8]) -> Result<Option<Vec<u8>>, StoreError>

Retrieves a value by key from the locked table.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§