Struct sp_trie::KeySpacedDBMut
source · [−]pub struct KeySpacedDBMut<'a, DB, H>(_, _, _);
Expand description
HashDBMut
implementation that append a encoded prefix (unique id bytes) in addition to the
prefix of every key value.
Mutable variant of KeySpacedDB
, see KeySpacedDB
.
Implementations
sourceimpl<'a, DB, H> KeySpacedDBMut<'a, DB, H> where
H: Hasher,
impl<'a, DB, H> KeySpacedDBMut<'a, DB, H> where
H: Hasher,
Trait Implementations
sourceimpl<'a, DB, H, T> AsHashDB<H, T> for KeySpacedDBMut<'a, DB, H> where
DB: HashDB<H, T>,
H: Hasher,
T: Default + PartialEq<T> + for<'b> From<&'b [u8]> + Clone + Send + Sync,
impl<'a, DB, H, T> AsHashDB<H, T> for KeySpacedDBMut<'a, DB, H> where
DB: HashDB<H, T>,
H: Hasher,
T: Default + PartialEq<T> + for<'b> From<&'b [u8]> + Clone + Send + Sync,
sourcefn as_hash_db(&self) -> &dyn HashDB<H, T>
fn as_hash_db(&self) -> &dyn HashDB<H, T>
Perform upcast to HashDB for anything that derives from HashDB.
sourcefn as_hash_db_mut<'b>(&'b mut self) -> &'b mut (dyn HashDB<H, T> + 'b)
fn as_hash_db_mut<'b>(&'b mut self) -> &'b mut (dyn HashDB<H, T> + 'b)
Perform mutable upcast to HashDB for anything that derives from HashDB.
sourceimpl<'a, DB, H, T> HashDB<H, T> for KeySpacedDBMut<'a, DB, H> where
DB: HashDB<H, T>,
H: Hasher,
T: Default + PartialEq<T> + for<'b> From<&'b [u8]> + Clone + Send + Sync,
impl<'a, DB, H, T> HashDB<H, T> for KeySpacedDBMut<'a, DB, H> where
DB: HashDB<H, T>,
H: Hasher,
T: Default + PartialEq<T> + for<'b> From<&'b [u8]> + Clone + Send + Sync,
sourcefn get(&self, key: &H::Out, prefix: Prefix<'_>) -> Option<T>
fn get(&self, key: &H::Out, prefix: Prefix<'_>) -> Option<T>
Look up a given hash into the bytes that hash to it, returning None if the hash is not known. Read more
sourcefn contains(&self, key: &H::Out, prefix: Prefix<'_>) -> bool
fn contains(&self, key: &H::Out, prefix: Prefix<'_>) -> bool
Check for the existance of a hash-key.
sourcefn insert(&mut self, prefix: Prefix<'_>, value: &[u8]) -> H::Out
fn insert(&mut self, prefix: Prefix<'_>, value: &[u8]) -> H::Out
Insert a datum item into the DB and return the datum’s hash for a later lookup. Insertions
are counted and the equivalent number of remove()
s must be performed before the data
is considered dead. Read more
Auto Trait Implementations
impl<'a, DB, H> RefUnwindSafe for KeySpacedDBMut<'a, DB, H> where
DB: RefUnwindSafe,
H: RefUnwindSafe,
impl<'a, DB, H> Send for KeySpacedDBMut<'a, DB, H> where
DB: Send,
H: Send,
impl<'a, DB, H> Sync for KeySpacedDBMut<'a, DB, H> where
DB: Sync,
H: Sync,
impl<'a, DB, H> Unpin for KeySpacedDBMut<'a, DB, H> where
H: Unpin,
impl<'a, DB, H> !UnwindSafe for KeySpacedDBMut<'a, DB, H>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
sourceimpl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
sourcepub fn unchecked_into(self) -> T
pub fn unchecked_into(self) -> T
The counterpart to unchecked_from
.