[−][src]Struct sp_state_machine::TrieBackend
Patricia trie-based backend. Transaction type is an overlay of changes to commit.
Implementations
impl<H: Hasher> TrieBackend<MemoryDB<H>, H> where
H::Out: Codec + Ord, [src][−]
H::Out: Codec + Ord,
pub fn update<T: IntoIterator<Item = (Option<ChildInfo>, StorageCollection)>>(
&self,
changes: T
) -> Self[src][−]
&self,
changes: T
) -> Self
Copy the state, with applied updates
pub fn insert<T: IntoIterator<Item = (Option<ChildInfo>, StorageCollection)>>(
&mut self,
changes: T
)[src][−]
&mut self,
changes: T
)
Insert values into backend trie.
pub fn update_backend(&self, root: H::Out, changes: MemoryDB<H>) -> Self[src][−]
Merge trie nodes into this backend.
pub fn eq(&self, other: &Self) -> bool[src][−]
Compare with another in-memory backend.
impl<S: TrieBackendStorage<H>, H: Hasher> TrieBackend<S, H> where
H::Out: Codec, [src][−]
H::Out: Codec,
pub fn new(storage: S, root: H::Out) -> Self[src][−]
Create new trie-based backend.
pub fn essence(&self) -> &TrieBackendEssence<S, H>[src][−]
Get backend essence reference.
pub fn backend_storage(&self) -> &S[src][−]
Get backend storage reference.
pub fn backend_storage_mut(&mut self) -> &mut S[src][−]
Get backend storage reference.
pub fn root(&self) -> &H::Out[src][−]
Get trie root.
pub fn into_storage(self) -> S[src][−]
Consumes self and returns underlying storage.
Trait Implementations
impl<S: TrieBackendStorage<H>, H: Hasher> Backend<H> for TrieBackend<S, H> where
H::Out: Ord + Codec, [src][+]
H::Out: Ord + Codec,
impl<H: Hasher> Clone for TrieBackend<MemoryDB<H>, H> where
H::Out: Codec + Ord, [src][+]
H::Out: Codec + Ord,
impl<S: TrieBackendStorage<H>, H: Hasher> Debug for TrieBackend<S, H>[src][+]
impl<H: Hasher> Default for TrieBackend<MemoryDB<H>, H> where
H::Out: Codec + Ord, [src][+]
H::Out: Codec + Ord,
impl<H: Hasher> From<BTreeMap<Vec<u8>, Vec<u8>>> for TrieBackend<MemoryDB<H>, H> where
H::Out: Codec + Ord, [src][+]
H::Out: Codec + Ord,
impl<H: Hasher> From<HashMap<Option<ChildInfo>, BTreeMap<Vec<u8>, Vec<u8>>, RandomState>> for TrieBackend<MemoryDB<H>, H> where
H::Out: Codec + Ord, [src][+]
H::Out: Codec + Ord,
impl<H: Hasher> From<Storage> for TrieBackend<MemoryDB<H>, H> where
H::Out: Codec + Ord, [src][+]
H::Out: Codec + Ord,
impl<H: Hasher> From<Vec<(Option<ChildInfo>, Vec<(Vec<u8>, Option<Vec<u8>>)>)>> for TrieBackend<MemoryDB<H>, H> where
H::Out: Codec + Ord, [src][+]
H::Out: Codec + Ord,
Auto Trait Implementations
impl<S, H> RefUnwindSafe for TrieBackend<S, H> where
S: RefUnwindSafe,
<H as Hasher>::Out: RefUnwindSafe,
S: RefUnwindSafe,
<H as Hasher>::Out: RefUnwindSafe,
impl<S, H> Send for TrieBackend<S, H> where
<H as Hasher>::Out: Send,
<H as Hasher>::Out: Send,
impl<S, H> Sync for TrieBackend<S, H> where
<H as Hasher>::Out: Sync,
<H as Hasher>::Out: Sync,
impl<S, H> Unpin for TrieBackend<S, H> where
S: Unpin,
<H as Hasher>::Out: Unpin,
S: Unpin,
<H as Hasher>::Out: Unpin,
impl<S, H> UnwindSafe for TrieBackend<S, H> where
S: UnwindSafe,
<H as Hasher>::Out: UnwindSafe,
S: UnwindSafe,
<H as Hasher>::Out: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src][+]
T: ?Sized,
impl<T> Clear for T where
T: InitializableFromZeroed + ?Sized, [src][+]
T: InitializableFromZeroed + ?Sized,
impl<T> From<T> for T[src][+]
impl<T> InitializableFromZeroed for T where
T: Default, [src][+]
T: Default,
impl<T, U> Into<U> for T where
U: From<T>, [src][+]
U: From<T>,
impl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>, [src][+]
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T> MaybeDebug for T where
T: Debug, [src]
T: Debug,
impl<T> MaybeDebug for T where
T: Debug, [src]
T: Debug,
impl<T> MaybeRefUnwindSafe for T where
T: RefUnwindSafe, [src]
T: RefUnwindSafe,
impl<T> Same<T> for T[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone, [src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src][+]
U: TryFrom<T>,
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>, [src][+]
T: UncheckedFrom<S>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>, [src][+]
V: MultiLane<T>,