Trait VersionedStateStoreR
pub trait VersionedStateStoreR<V>: Send + Syncwhere
V: VersionIdentifier,{
// Required methods
fn get(&self, version_id: &V, key: Key) -> Option<Value>;
fn get_all(&self, version_id: &V, key_prefix: Key) -> HashMap<Key, Value>;
fn latest_version_id(&self) -> Option<V>;
// Provided method
fn debug_iter<'a>(
&'a self,
version_id: &V,
) -> Box<dyn Iterator<Item = (Key, Value)> + 'a> { ... }
}Expand description
Read-only storage with versioning.
Required Methods§
fn get(&self, version_id: &V, key: Key) -> Option<Value>
fn get(&self, version_id: &V, key: Key) -> Option<Value>
Retrieve the value for a particular version given a key. Returns None if not exists.
fn get_all(&self, version_id: &V, key_prefix: Key) -> HashMap<Key, Value>
fn get_all(&self, version_id: &V, key_prefix: Key) -> HashMap<Key, Value>
Retrieve all the values for a given key prefix in a given version. HashMap is empty if no such version or key prefix not exists.
fn latest_version_id(&self) -> Option<V>
fn latest_version_id(&self) -> Option<V>
Obtain the latest version identifier that has been successfully written.