[][src]Trait casper_execution_engine::storage::store::Store

pub trait Store<K, V> {
    type Error: From<Error>;
    type Handle;
    pub fn handle(&self) -> Self::Handle;

    pub fn get<T>(&self, txn: &T, key: &K) -> Result<Option<V>, Self::Error>
    where
        T: Readable<Handle = Self::Handle>,
        K: ToBytes,
        V: FromBytes,
        Self::Error: From<T::Error>
, { ... }
pub fn put<T>(
        &self,
        txn: &mut T,
        key: &K,
        value: &V
    ) -> Result<(), Self::Error>
    where
        T: Writable<Handle = Self::Handle>,
        K: ToBytes,
        V: ToBytes,
        Self::Error: From<T::Error>
, { ... } }

Associated Types

Loading content...

Required methods

pub fn handle(&self) -> Self::Handle[src]

Loading content...

Provided methods

pub fn get<T>(&self, txn: &T, key: &K) -> Result<Option<V>, Self::Error> where
    T: Readable<Handle = Self::Handle>,
    K: ToBytes,
    V: FromBytes,
    Self::Error: From<T::Error>, 
[src]

pub fn put<T>(&self, txn: &mut T, key: &K, value: &V) -> Result<(), Self::Error> where
    T: Writable<Handle = Self::Handle>,
    K: ToBytes,
    V: ToBytes,
    Self::Error: From<T::Error>, 
[src]

Loading content...

Implementors

impl Store<ProtocolVersion, ProtocolData> for InMemoryProtocolDataStore[src]

type Error = Error

type Handle = Option<String>

impl Store<ProtocolVersion, ProtocolData> for LmdbProtocolDataStore[src]

type Error = Error

type Handle = Database

impl<K, V> Store<Blake2bHash, Trie<K, V>> for InMemoryTrieStore[src]

type Error = Error

type Handle = Option<String>

impl<K, V> Store<Blake2bHash, Trie<K, V>> for LmdbTrieStore[src]

type Error = Error

type Handle = Database

Loading content...