pub struct SecureTrie<D: DatabaseGuard>(/* private fields */);Implementations§
Source§impl<D: DatabaseGuard> SecureTrie<D>
impl<D: DatabaseGuard> SecureTrie<D>
pub fn new(trie: Trie<D>) -> Self
pub fn empty(database: D) -> Self
pub fn existing(database: D, root: H256) -> Self
pub fn root(&self) -> H256
pub fn is_empty(&self) -> bool
pub fn get<K: AsRef<[u8]>, V: Decodable>(&self, key: &K) -> Option<V>
pub fn insert<K: AsRef<[u8]>, V: Encodable>(&mut self, key: K, value: V)
pub fn remove<K: AsRef<[u8]>>(&mut self, key: &K)
Trait Implementations§
Source§impl<D: Clone + DatabaseGuard> Clone for SecureTrie<D>
impl<D: Clone + DatabaseGuard> Clone for SecureTrie<D>
Source§fn clone(&self) -> SecureTrie<D>
fn clone(&self) -> SecureTrie<D>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<D> Freeze for SecureTrie<D>where
D: Freeze,
impl<D> RefUnwindSafe for SecureTrie<D>where
D: RefUnwindSafe,
impl<D> Send for SecureTrie<D>where
D: Send,
impl<D> Sync for SecureTrie<D>where
D: Sync,
impl<D> Unpin for SecureTrie<D>where
D: Unpin,
impl<D> UnwindSafe for SecureTrie<D>where
D: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more