Struct casper_execution_engine::storage::trie_store::lmdb::LmdbTrieStore
source · pub struct LmdbTrieStore { /* private fields */ }
Expand description
An LMDB-backed trie store.
Wraps lmdb::Database
.
Implementations§
source§impl LmdbTrieStore
impl LmdbTrieStore
sourcepub fn new(
env: &LmdbEnvironment,
maybe_name: Option<&str>,
flags: DatabaseFlags
) -> Result<Self, Error>
pub fn new( env: &LmdbEnvironment, maybe_name: Option<&str>, flags: DatabaseFlags ) -> Result<Self, Error>
Constructor for new LmdbTrieStore
.
Trait Implementations§
source§impl Clone for LmdbTrieStore
impl Clone for LmdbTrieStore
source§fn clone(&self) -> LmdbTrieStore
fn clone(&self) -> LmdbTrieStore
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for LmdbTrieStore
impl Debug for LmdbTrieStore
source§impl<K, V> Store<Digest, Trie<K, V>> for LmdbTrieStore
impl<K, V> Store<Digest, Trie<K, V>> for LmdbTrieStore
source§fn get_raw<T>(&self, txn: &T, key: &K) -> Result<Option<Bytes>, Self::Error>where
T: Readable<Handle = Self::Handle>,
K: AsRef<[u8]>,
Self::Error: From<T::Error>,
fn get_raw<T>(&self, txn: &T, key: &K) -> Result<Option<Bytes>, Self::Error>where T: Readable<Handle = Self::Handle>, K: AsRef<[u8]>, Self::Error: From<T::Error>,
Returns an optional value (may exist or not) as read through a transaction, or an error
of the associated
Self::Error
variety.source§fn put_raw<T>(
&self,
txn: &mut T,
key: &K,
value_bytes: Cow<'_, [u8]>
) -> Result<(), Self::Error>where
T: Writable<Handle = Self::Handle>,
K: AsRef<[u8]>,
Self::Error: From<T::Error>,
fn put_raw<T>( &self, txn: &mut T, key: &K, value_bytes: Cow<'_, [u8]> ) -> Result<(), Self::Error>where T: Writable<Handle = Self::Handle>, K: AsRef<[u8]>, Self::Error: From<T::Error>,
Puts a raw
value
into the store at key
within a transaction, potentially returning an
error of type Self::Error
if that fails. Read moreimpl<K, V> TrieStore<K, V> for LmdbTrieStore
Auto Trait Implementations§
impl RefUnwindSafe for LmdbTrieStore
impl Send for LmdbTrieStore
impl Sync for LmdbTrieStore
impl Unpin for LmdbTrieStore
impl UnwindSafe for LmdbTrieStore
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<K, V, T> StoreExt<K, V> for Twhere
T: Store<K, V>,
impl<K, V, T> StoreExt<K, V> for Twhere T: Store<K, V>,
source§fn get_many<'a, T>(
&self,
txn: &T,
keys: impl Iterator<Item = &'a K>
) -> Result<Vec<Option<V>>, Self::Error>where
T: Readable<Handle = Self::Handle>,
K: AsRef<[u8]> + 'a,
V: FromBytes,
Self::Error: From<T::Error>,
fn get_many<'a, T>( &self, txn: &T, keys: impl Iterator<Item = &'a K> ) -> Result<Vec<Option<V>>, Self::Error>where T: Readable<Handle = Self::Handle>, K: AsRef<[u8]> + 'a, V: FromBytes, Self::Error: From<T::Error>,
Returns multiple optional values (each may exist or not) from the store in one transaction.
source§fn put_many<'a, T>(
&self,
txn: &mut T,
pairs: impl Iterator<Item = (&'a K, &'a V)>
) -> Result<(), Self::Error>where
T: Writable<Handle = Self::Handle>,
K: AsRef<[u8]> + 'a,
V: ToBytes + 'a,
Self::Error: From<T::Error>,
fn put_many<'a, T>( &self, txn: &mut T, pairs: impl Iterator<Item = (&'a K, &'a V)> ) -> Result<(), Self::Error>where T: Writable<Handle = Self::Handle>, K: AsRef<[u8]> + 'a, V: ToBytes + 'a, Self::Error: From<T::Error>,
Puts multiple key/value pairs into the store in one transaction, potentially returning an
error of type
Self::Error
if that fails.