Struct trie_db::TrieFactory
source · pub struct TrieFactory { /* private fields */ }
Expand description
Trie factory.
Implementations§
source§impl TrieFactory
impl TrieFactory
sourcepub fn readonly<'db, 'cache, L: TrieLayout>(
&self,
db: &'db dyn HashDBRef<L::Hash, DBValue>,
root: &'db TrieHash<L>,
) -> TrieKinds<'db, 'cache, L>
pub fn readonly<'db, 'cache, L: TrieLayout>( &self, db: &'db dyn HashDBRef<L::Hash, DBValue>, root: &'db TrieHash<L>, ) -> TrieKinds<'db, 'cache, L>
Create new immutable instance of Trie.
sourcepub fn create<'db, L: TrieLayout + 'db>(
&self,
db: &'db mut dyn HashDB<L::Hash, DBValue>,
root: &'db mut TrieHash<L>,
) -> Box<dyn TrieMut<L> + 'db>
pub fn create<'db, L: TrieLayout + 'db>( &self, db: &'db mut dyn HashDB<L::Hash, DBValue>, root: &'db mut TrieHash<L>, ) -> Box<dyn TrieMut<L> + 'db>
Create new mutable instance of Trie.
sourcepub fn from_existing<'db, L: TrieLayout + 'db>(
&self,
db: &'db mut dyn HashDB<L::Hash, DBValue>,
root: &'db mut TrieHash<L>,
) -> Box<dyn TrieMut<L> + 'db>
pub fn from_existing<'db, L: TrieLayout + 'db>( &self, db: &'db mut dyn HashDB<L::Hash, DBValue>, root: &'db mut TrieHash<L>, ) -> Box<dyn TrieMut<L> + 'db>
Create new mutable instance of trie and check for errors.
Trait Implementations§
source§impl Clone for TrieFactory
impl Clone for TrieFactory
source§fn clone(&self) -> TrieFactory
fn clone(&self) -> TrieFactory
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 Default for TrieFactory
impl Default for TrieFactory
source§fn default() -> TrieFactory
fn default() -> TrieFactory
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TrieFactory
impl RefUnwindSafe for TrieFactory
impl Send for TrieFactory
impl Sync for TrieFactory
impl Unpin for TrieFactory
impl UnwindSafe for TrieFactory
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)