[−][src]Struct trie_db::TrieFactory
Trie factory.
Methods
impl<'db, H, C> TrieFactory<H, C> where
H: Hasher,
C: NodeCodec<H> + 'db,
[src]
H: Hasher,
C: NodeCodec<H> + 'db,
pub fn new(spec: TrieSpec) -> Self
[src]
Creates new factory.
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>
[src]
&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.
pub fn create(
&self,
db: &'db mut dyn HashDB<H, DBValue>,
root: &'db mut H::Out
) -> Box<dyn TrieMut<H, C> + 'db>
[src]
&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.
pub fn from_existing(
&self,
db: &'db mut dyn HashDB<H, DBValue>,
root: &'db mut H::Out
) -> Result<Box<dyn TrieMut<H, C> + 'db>, H::Out, <C as NodeCodec<H>>::Error>
[src]
&self,
db: &'db mut dyn HashDB<H, DBValue>,
root: &'db mut H::Out
) -> Result<Box<dyn TrieMut<H, C> + 'db>, H::Out, <C as NodeCodec<H>>::Error>
Create new mutable instance of trie and check for errors.
pub fn is_fat(&self) -> bool
[src]
Returns true iff the trie DB is a fat DB (allows enumeration of keys).
Trait Implementations
impl<H: Clone + Hasher, C: Clone + NodeCodec<H>> Clone for TrieFactory<H, C>
[src]
fn clone(&self) -> TrieFactory<H, C>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<H: Default + Hasher, C: Default + NodeCodec<H>> Default for TrieFactory<H, C>
[src]
fn default() -> TrieFactory<H, C>
[src]
Auto Trait Implementations
impl<H, C> Send for TrieFactory<H, C> where
C: Send,
C: Send,
impl<H, C> Sync for TrieFactory<H, C> where
C: Sync,
C: Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,