Struct patricia_trie::TrieFactory [−][src]
Trie factory.
Methods
impl<'db, H, C> TrieFactory<H, C> where
H: Hasher,
C: NodeCodec<H> + 'db,
[src]
impl<'db, H, C> TrieFactory<H, C> where
H: Hasher,
C: NodeCodec<H> + 'db,
pub fn new(spec: TrieSpec) -> Self
[src]
pub fn new(spec: TrieSpec) -> Self
Creates new factory.
pub fn readonly(
&self,
db: &'db HashDB<H>,
root: &'db H::Out
) -> Result<TrieKinds<'db, H, C>, H::Out, <C as NodeCodec<H>>::Error>
[src]
pub fn readonly(
&self,
db: &'db HashDB<H>,
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 HashDB<H>,
root: &'db mut H::Out
) -> Box<TrieMut<H, C> + 'db>
[src]
pub fn create(
&self,
db: &'db mut HashDB<H>,
root: &'db mut H::Out
) -> Box<TrieMut<H, C> + 'db>
Create new mutable instance of Trie.
pub fn from_existing(
&self,
db: &'db mut HashDB<H>,
root: &'db mut H::Out
) -> Result<Box<TrieMut<H, C> + 'db>, H::Out, <C as NodeCodec<H>>::Error>
[src]
pub fn from_existing(
&self,
db: &'db mut HashDB<H>,
root: &'db mut H::Out
) -> Result<Box<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]
pub fn is_fat(&self) -> bool
Returns true iff the trie DB is a fat DB (allows enumeration of keys).
Trait Implementations
impl<H: Default + Hasher, C: Default + NodeCodec<H>> Default for TrieFactory<H, C>
[src]
impl<H: Default + Hasher, C: Default + NodeCodec<H>> Default for TrieFactory<H, C>
fn default() -> TrieFactory<H, C>
[src]
fn default() -> TrieFactory<H, C>
Returns the "default value" for a type. Read more
impl<H: Clone + Hasher, C: Clone + NodeCodec<H>> Clone for TrieFactory<H, C>
[src]
impl<H: Clone + Hasher, C: Clone + NodeCodec<H>> Clone for TrieFactory<H, C>
fn clone(&self) -> TrieFactory<H, C>
[src]
fn clone(&self) -> TrieFactory<H, C>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<H, C> Send for TrieFactory<H, C> where
C: Send,
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> Sync for TrieFactory<H, C> where
C: Sync,