Trait casper_execution_engine::storage::global_state::StateReader [−][src]
pub trait StateReader<K, V> { type Error; fn read(
&self,
correlation_id: CorrelationId,
key: &K
) -> Result<Option<V>, Self::Error>; fn read_with_proof(
&self,
correlation_id: CorrelationId,
key: &K
) -> Result<Option<TrieMerkleProof<K, V>>, Self::Error>; fn keys_with_prefix(
&self,
correlation_id: CorrelationId,
prefix: &[u8]
) -> Result<Vec<K>, Self::Error>; }
Expand description
A reader of state
Associated Types
Required methods
fn read(
&self,
correlation_id: CorrelationId,
key: &K
) -> Result<Option<V>, Self::Error>
[src]
fn read(
&self,
correlation_id: CorrelationId,
key: &K
) -> Result<Option<V>, Self::Error>
[src]Returns the state value from the corresponding key
fn read_with_proof(
&self,
correlation_id: CorrelationId,
key: &K
) -> Result<Option<TrieMerkleProof<K, V>>, Self::Error>
[src]
fn read_with_proof(
&self,
correlation_id: CorrelationId,
key: &K
) -> Result<Option<TrieMerkleProof<K, V>>, Self::Error>
[src]Returns the merkle proof of the state value from the corresponding key
fn keys_with_prefix(
&self,
correlation_id: CorrelationId,
prefix: &[u8]
) -> Result<Vec<K>, Self::Error>
[src]
fn keys_with_prefix(
&self,
correlation_id: CorrelationId,
prefix: &[u8]
) -> Result<Vec<K>, Self::Error>
[src]Returns the keys in the trie matching prefix
.
Implementors
impl StateReader<Key, StoredValue> for InMemoryGlobalStateView
[src]
impl StateReader<Key, StoredValue> for InMemoryGlobalStateView
[src]type Error = Error
fn read(
&self,
correlation_id: CorrelationId,
key: &Key
) -> Result<Option<StoredValue>, Self::Error>
[src]
&self,
correlation_id: CorrelationId,
key: &Key
) -> Result<Option<StoredValue>, Self::Error>
fn read_with_proof(
&self,
correlation_id: CorrelationId,
key: &Key
) -> Result<Option<TrieMerkleProof<Key, StoredValue>>, Self::Error>
[src]
&self,
correlation_id: CorrelationId,
key: &Key
) -> Result<Option<TrieMerkleProof<Key, StoredValue>>, Self::Error>
fn keys_with_prefix(
&self,
correlation_id: CorrelationId,
prefix: &[u8]
) -> Result<Vec<Key>, Self::Error>
[src]
&self,
correlation_id: CorrelationId,
prefix: &[u8]
) -> Result<Vec<Key>, Self::Error>
impl StateReader<Key, StoredValue> for LmdbGlobalStateView
[src]
impl StateReader<Key, StoredValue> for LmdbGlobalStateView
[src]type Error = Error
fn read(
&self,
correlation_id: CorrelationId,
key: &Key
) -> Result<Option<StoredValue>, Self::Error>
[src]
&self,
correlation_id: CorrelationId,
key: &Key
) -> Result<Option<StoredValue>, Self::Error>
fn read_with_proof(
&self,
correlation_id: CorrelationId,
key: &Key
) -> Result<Option<TrieMerkleProof<Key, StoredValue>>, Self::Error>
[src]
&self,
correlation_id: CorrelationId,
key: &Key
) -> Result<Option<TrieMerkleProof<Key, StoredValue>>, Self::Error>
fn keys_with_prefix(
&self,
correlation_id: CorrelationId,
prefix: &[u8]
) -> Result<Vec<Key>, Self::Error>
[src]
&self,
correlation_id: CorrelationId,
prefix: &[u8]
) -> Result<Vec<Key>, Self::Error>