[][src]Struct sp_state_machine::InMemoryBackend

pub struct InMemoryBackend<H: Hasher> { /* fields omitted */ }

In-memory backend. Fully recomputes tries each time as_trie_backend is called but useful for tests and proof checking.

Methods

impl<H: Hasher> InMemory<H>[src]

pub fn update<T: IntoIterator<Item = (Option<(StorageKey, OwnedChildInfo)>, StorageCollection)>>(
    &self,
    changes: T
) -> Self
[src]

Copy the state, with applied updates

impl<H: Hasher> InMemory<H>[src]

pub fn child_storage_keys(&self) -> impl Iterator<Item = (&[u8], ChildInfo)>[src]

child storage key iterator

Trait Implementations

impl<H: Hasher> Backend<H> for InMemory<H> where
    H::Out: Codec
[src]

type Error = Void

An error type when fetching data is not possible.

type Transaction = Vec<(Option<(StorageKey, OwnedChildInfo)>, StorageCollection)>

Storage changes to be applied if committing

type TrieBackendStorage = MemoryDB<H>

Type of trie backend storage.

impl<H: Hasher> Clone for InMemory<H>[src]

impl<H: Hasher> Debug for InMemory<H>[src]

impl<H: Hasher> Default for InMemory<H>[src]

impl<H: Hasher> From<BTreeMap<Vec<u8>, Vec<u8>>> for InMemory<H>[src]

impl<H: Hasher> From<HashMap<Option<(Vec<u8>, OwnedChildInfo)>, BTreeMap<Vec<u8>, Vec<u8>>, RandomState>> for InMemory<H>[src]

impl<H: Hasher> From<Storage> for InMemory<H>[src]

impl<H: Hasher> From<Vec<(Option<(Vec<u8>, OwnedChildInfo)>, Vec<(Vec<u8>, Option<Vec<u8>>)>)>> for InMemory<H>[src]

impl<H: Hasher> PartialEq<InMemory<H>> for InMemory<H>[src]

Auto Trait Implementations

impl<H> RefUnwindSafe for InMemory<H> where
    H: RefUnwindSafe,
    <H as Hasher>::Out: RefUnwindSafe

impl<H> Send for InMemory<H> where
    <H as Hasher>::Out: Send

impl<H> Sync for InMemory<H> where
    <H as Hasher>::Out: Sync

impl<H> Unpin for InMemory<H> where
    H: Unpin,
    <H as Hasher>::Out: Unpin

impl<H> UnwindSafe for InMemory<H> where
    H: UnwindSafe,
    <H as Hasher>::Out: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Clear for T where
    T: InitializableFromZeroed + ?Sized

impl<T> From<T> for T[src]

impl<T> InitializableFromZeroed for T where
    T: Default

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, Outer> IsWrappedBy<Outer> for T where
    Outer: AsRef<T> + AsMut<T> + From<T>,
    T: From<Outer>, 
[src]

fn from_ref(outer: &Outer) -> &T[src]

Get a reference to the inner from the outer.

fn from_mut(outer: &mut Outer) -> &mut T[src]

Get a mutable reference to the inner from the outer.

impl<T> MaybeDebug for T where
    T: Debug
[src]

impl<T> MaybeDebug for T where
    T: Debug

impl<T> MaybeRefUnwindSafe for T where
    T: RefUnwindSafe

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,