[][src]Struct sp_state_machine::TrieBackend

pub struct TrieBackend<S: TrieBackendStorage<H>, H: Hasher> { /* fields omitted */ }

Patricia trie-based backend. Transaction type is an overlay of changes to commit.

Methods

impl<S: TrieBackendStorage<H>, H: Hasher> TrieBackend<S, H> where
    H::Out: Codec
[src]

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 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]

type Error = String

An error type when fetching data is not possible.

type Transaction = S::Overlay

Storage changes to be applied if committing

type TrieBackendStorage = S

Type of trie backend storage.

impl<S: TrieBackendStorage<H>, H: Hasher> Debug for TrieBackend<S, H>[src]

Auto Trait Implementations

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

impl<S, H> Send for TrieBackend<S, H> where
    <H as Hasher>::Out: Send

impl<S, H> Sync for TrieBackend<S, H> where
    <H as Hasher>::Out: Sync

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

impl<S, H> UnwindSafe for TrieBackend<S, H> where
    S: 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> From<T> for T[src]

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, 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>,