pub trait Database<'a> {
type Guard: DatabaseGuard + 'a;
// Required method
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> { ... }
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> { ... }
}Required 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>
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>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.