Trait trie::Database
[−]
[src]
pub trait Database<'a> { type Guard: DatabaseGuard + 'a; fn create_guard(&'a self) -> Self::Guard; fn create_trie(&'a self, root: H256) -> Trie<Self::Guard> { ... } fn create_empty(&'a self) -> Trie<Self::Guard> { ... } fn create_secure_trie(&'a self, root: H256) -> SecureTrie<Self::Guard> { ... } fn create_secure_empty(&'a self) -> SecureTrie<Self::Guard> { ... } fn create_fixed_trie<K: Encodable + Decodable, V: Encodable + Decodable>(
&'a self,
root: H256
) -> FixedTrie<Self::Guard, K, V> { ... } fn create_fixed_empty<K: Encodable + Decodable, V: Encodable + Decodable>(
&'a self
) -> FixedTrie<Self::Guard, K, V> { ... } fn create_fixed_secure_trie<K: AsRef<[u8]>, V: Encodable + Decodable>(
&'a self,
root: H256
) -> FixedSecureTrie<Self::Guard, K, V> { ... } fn create_fixed_secure_empty<K: AsRef<[u8]>, V: Encodable + Decodable>(
&'a self
) -> FixedSecureTrie<Self::Guard, K, V> { ... } }
Associated Types
type Guard: DatabaseGuard + 'a
Required Methods
fn create_guard(&'a self) -> Self::Guard
Provided Methods
fn create_trie(&'a self, root: H256) -> Trie<Self::Guard>
fn create_empty(&'a self) -> Trie<Self::Guard>
fn create_secure_trie(&'a self, root: H256) -> SecureTrie<Self::Guard>
fn create_secure_empty(&'a self) -> SecureTrie<Self::Guard>
fn create_fixed_trie<K: Encodable + Decodable, V: Encodable + Decodable>(
&'a self,
root: H256
) -> FixedTrie<Self::Guard, K, V>
&'a self,
root: H256
) -> FixedTrie<Self::Guard, K, V>
fn create_fixed_empty<K: Encodable + Decodable, V: Encodable + Decodable>(
&'a self
) -> FixedTrie<Self::Guard, K, V>
&'a self
) -> FixedTrie<Self::Guard, K, V>
fn create_fixed_secure_trie<K: AsRef<[u8]>, V: Encodable + Decodable>(
&'a self,
root: H256
) -> FixedSecureTrie<Self::Guard, K, V>
&'a self,
root: H256
) -> FixedSecureTrie<Self::Guard, K, V>
fn create_fixed_secure_empty<K: AsRef<[u8]>, V: Encodable + Decodable>(
&'a self
) -> FixedSecureTrie<Self::Guard, K, V>
&'a self
) -> FixedSecureTrie<Self::Guard, K, V>
Implementors
impl<'a> Database<'a> for MemoryDatabase type Guard = MemoryDatabaseGuard<'a>;