Struct sp_state_machine::InMemoryChangesTrieStorage[][src]

pub struct InMemoryChangesTrieStorage<H: Hasher, Number: BlockNumber> { /* fields omitted */ }

In-memory implementation of changes trie storage.

Implementations

impl<H: Hasher, Number: BlockNumber> InMemoryStorage<H, Number>[src]

pub fn with_db(mdb: MemoryDB<H>) -> Self[src]

Creates storage from given in-memory database.

pub fn new() -> Self[src]

Creates storage with empty database.

pub fn with_proof(proof: Vec<Vec<u8>>) -> Self[src]

Creates storage with given proof.

pub fn cache_mut(&mut self) -> &mut BuildCache<H::Out, Number>[src]

Get mutable cache reference.

pub fn with_blocks(blocks: Vec<(Number, H::Out)>) -> Self[src]

Create the storage with given blocks.

pub fn insert(
    &self,
    block: Number,
    changes_trie_root: H::Out,
    trie: MemoryDB<H>
)
[src]

Insert changes trie for given block.

Trait Implementations

impl<H: Hasher, Number: BlockNumber> RootsStorage<H, Number> for InMemoryStorage<H, Number>[src]

impl<H: Hasher, Number: BlockNumber> Storage<H, Number> for InMemoryStorage<H, Number>[src]

Auto Trait Implementations

impl<H, Number> !RefUnwindSafe for InMemoryStorage<H, Number>

impl<H, Number> Send for InMemoryStorage<H, Number>

impl<H, Number> Sync for InMemoryStorage<H, Number>

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

impl<H, Number> UnwindSafe for InMemoryStorage<H, Number> where
    H: UnwindSafe,
    Number: RefUnwindSafe + UnwindSafe,
    <H as Hasher>::Out: RefUnwindSafe + 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> Instrument for T[src]

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

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

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

Get a reference to the inner from the outer.

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

Get a mutable reference to the inner from the outer.

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

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

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>, 
[src]