Struct trie_db::TrieFactory
source · [−]Expand description
Trie factory.
Implementations
sourceimpl<'db, H, C> TrieFactory<H, C> where
H: Hasher,
C: NodeCodec<H> + 'db,
impl<'db, H, C> TrieFactory<H, C> where
H: Hasher,
C: NodeCodec<H> + 'db,
sourcepub fn readonly(
&self,
db: &'db dyn HashDBRef<H, DBValue>,
root: &'db H::Out
) -> Result<TrieKinds<'db, H, C>, H::Out, <C as NodeCodec<H>>::Error>
pub fn readonly(
&self,
db: &'db dyn HashDBRef<H, DBValue>,
root: &'db H::Out
) -> Result<TrieKinds<'db, H, C>, H::Out, <C as NodeCodec<H>>::Error>
Create new immutable instance of Trie.
sourcepub fn create(
&self,
db: &'db mut dyn HashDB<H, DBValue>,
root: &'db mut H::Out
) -> Box<dyn TrieMut<H, C> + 'db>
pub fn create(
&self,
db: &'db mut dyn HashDB<H, DBValue>,
root: &'db mut H::Out
) -> Box<dyn TrieMut<H, C> + 'db>
Create new mutable instance of Trie.
Trait Implementations
sourceimpl<H: Clone + Hasher, C: Clone + NodeCodec<H>> Clone for TrieFactory<H, C>
impl<H: Clone + Hasher, C: Clone + NodeCodec<H>> Clone for TrieFactory<H, C>
sourcefn clone(&self) -> TrieFactory<H, C>
fn clone(&self) -> TrieFactory<H, C>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<H, C> RefUnwindSafe for TrieFactory<H, C> where
C: RefUnwindSafe,
H: RefUnwindSafe,
impl<H, C> Send for TrieFactory<H, C> where
C: Send,
impl<H, C> Sync for TrieFactory<H, C> where
C: Sync,
impl<H, C> Unpin for TrieFactory<H, C> where
C: Unpin,
H: Unpin,
impl<H, C> UnwindSafe for TrieFactory<H, C> where
C: UnwindSafe,
H: UnwindSafe,
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> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more