Struct trie_db::TrieFactory
source · [−]pub struct TrieFactory<L: TrieLayout> { /* private fields */ }
Expand description
Trie factory.
Implementations
sourceimpl<'db, L> TrieFactory<L> where
L: TrieLayout + 'db,
impl<'db, L> TrieFactory<L> where
L: TrieLayout + 'db,
sourcepub fn readonly(
&self,
db: &'db dyn HashDBRef<L::Hash, DBValue>,
root: &'db TrieHash<L>
) -> Result<TrieKinds<'db, L>, TrieHash<L>, CError<L>>
pub fn readonly(
&self,
db: &'db dyn HashDBRef<L::Hash, DBValue>,
root: &'db TrieHash<L>
) -> Result<TrieKinds<'db, L>, TrieHash<L>, CError<L>>
Create new immutable instance of Trie.
sourcepub fn create(
&self,
db: &'db mut dyn HashDB<L::Hash, DBValue>,
root: &'db mut TrieHash<L>
) -> Box<dyn TrieMut<L> + 'db>ⓘNotable traits for Box<R, Global>impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
pub fn create(
&self,
db: &'db mut dyn HashDB<L::Hash, DBValue>,
root: &'db mut TrieHash<L>
) -> Box<dyn TrieMut<L> + 'db>ⓘNotable traits for Box<R, Global>impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
Create new mutable instance of Trie.
Trait Implementations
sourceimpl<L: Clone + TrieLayout> Clone for TrieFactory<L>
impl<L: Clone + TrieLayout> Clone for TrieFactory<L>
sourcefn clone(&self) -> TrieFactory<L>
fn clone(&self) -> TrieFactory<L>
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
sourceimpl<L: Default + TrieLayout> Default for TrieFactory<L>
impl<L: Default + TrieLayout> Default for TrieFactory<L>
sourcefn default() -> TrieFactory<L>
fn default() -> TrieFactory<L>
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl<L> RefUnwindSafe for TrieFactory<L> where
L: RefUnwindSafe,
impl<L> Send for TrieFactory<L> where
L: Send,
impl<L> Sync for TrieFactory<L> where
L: Sync,
impl<L> Unpin for TrieFactory<L> where
L: Unpin,
impl<L> UnwindSafe for TrieFactory<L> where
L: 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