pub struct InMemoryChangesTrieStorage<H: Hasher, Number: BlockNumber> { /* private fields */ }
Expand description
In-memory implementation of changes trie storage.
Implementations
sourceimpl<H: Hasher, Number: BlockNumber> InMemoryStorage<H, Number>
impl<H: Hasher, Number: BlockNumber> InMemoryStorage<H, Number>
sourcepub fn with_proof(proof: Vec<Vec<u8>>) -> Self
pub fn with_proof(proof: Vec<Vec<u8>>) -> Self
Creates storage with given proof.
sourcepub fn cache_mut(&mut self) -> &mut BuildCache<H::Out, Number>
pub fn cache_mut(&mut self) -> &mut BuildCache<H::Out, Number>
Get mutable cache reference.
Trait Implementations
sourceimpl<H: Hasher, Number: BlockNumber> RootsStorage<H, Number> for InMemoryStorage<H, Number>
impl<H: Hasher, Number: BlockNumber> RootsStorage<H, Number> for InMemoryStorage<H, Number>
sourcefn build_anchor(
&self,
parent_hash: H::Out
) -> Result<AnchorBlockId<H::Out, Number>, String>
fn build_anchor(
&self,
parent_hash: H::Out
) -> Result<AnchorBlockId<H::Out, Number>, String>
Resolve hash of the block into anchor.
sourceimpl<H: Hasher, Number: BlockNumber> Storage<H, Number> for InMemoryStorage<H, Number>
impl<H: Hasher, Number: BlockNumber> Storage<H, Number> for InMemoryStorage<H, Number>
sourcefn as_roots_storage(&self) -> &dyn RootsStorage<H, Number>
fn as_roots_storage(&self) -> &dyn RootsStorage<H, Number>
Casts from self reference to RootsStorage reference.
sourcefn with_cached_changed_keys(
&self,
root: &H::Out,
functor: &mut dyn FnMut(&HashMap<Option<PrefixedStorageKey>, HashSet<StorageKey>>)
) -> bool
fn with_cached_changed_keys(
&self,
root: &H::Out,
functor: &mut dyn FnMut(&HashMap<Option<PrefixedStorageKey>, HashSet<StorageKey>>)
) -> bool
Execute given functor with cached entry for given trie root. Returns true if the functor has been called (cache entry exists) and false otherwise. Read more
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: UnwindSafe + RefUnwindSafe,
<H as Hasher>::Out: UnwindSafe + RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
sourceimpl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
sourcepub fn unchecked_into(self) -> T
pub fn unchecked_into(self) -> T
The counterpart to unchecked_from
.