[−][src]Trait orga::store::Read
Trait for read access to key/value stores.
Required methods
fn get(&self, key: &[u8]) -> Result<Option<Vec<u8>>>
Gets a value by key.
Implementations of get
should return None
when there is no value for
the key rather than erroring.
Provided methods
fn wrap<T: State<Self>>(self) -> Result<T>
Wraps self with a given state::State
implementation, provided for convenience.
fn into_shared(self) -> Shared<Self>
Wraps self with Shared
, allowing it to be cloned
so that multiple callers can share the reference to the underlying
store.
fn prefix(self, prefix: u8) -> Prefixed<Self>
Wraps self with Prefixed
using the given
prefix byte, so that all operations have the prefix prepended to their
keys.
fn into_splitter(self) -> Splitter<Self>
Wraps self with Splitter
so that prefixed
substores may be created by calling .split()
.
fn as_ref<'a>(&'a self) -> &'a Self
Returns an immutable reference to the store.
Implementors
impl Read for MemStore
[src]
impl Read for TendermintClient
[src]
fn get(&self, key: &[u8]) -> Result<Option<Vec<u8>>>
[src]
Gets a value from the store by making a raw key query to the Tendermint
RPC server. The raw response bytes will be returned, which may include
unverified proof bytes depending on the node's
ABCIStore
implementation.
impl Read for NullStore
[src]
impl<'a> Read for MerkStore<'a>
[src]
fn get(&self, key: &[u8]) -> Result<Option<Vec<u8>>>
[src]
Gets a value from the underlying Merk
store.
impl<R: Read> Read for Client<R>
[src]
fn get(&self, key: &[u8]) -> Result<Option<Vec<u8>>>
[src]
Gets a value for the given key, then decodes the response as a Merk proof and verifies it, returning the extracted value.