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]
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]
&self,
block: Number,
changes_trie_root: H::Out,
trie: MemoryDB<H>
)
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> RootsStorage<H, Number> for InMemoryStorage<H, Number>
[src]fn build_anchor(
&self,
parent_hash: H::Out
) -> Result<AnchorBlockId<H::Out, Number>, String>
[src]
&self,
parent_hash: H::Out
) -> Result<AnchorBlockId<H::Out, Number>, String>
fn root(
&self,
_anchor_block: &AnchorBlockId<H::Out, Number>,
block: Number
) -> Result<Option<H::Out>, String>
[src]
&self,
_anchor_block: &AnchorBlockId<H::Out, Number>,
block: Number
) -> Result<Option<H::Out>, String>
impl<H: Hasher, Number: BlockNumber> Storage<H, Number> for InMemoryStorage<H, Number>
[src]
impl<H: Hasher, Number: BlockNumber> Storage<H, Number> for InMemoryStorage<H, Number>
[src]fn as_roots_storage(&self) -> &dyn RootsStorage<H, Number>
[src]
fn with_cached_changed_keys(
&self,
root: &H::Out,
functor: &mut dyn FnMut(&HashMap<Option<PrefixedStorageKey>, HashSet<StorageKey>>)
) -> bool
[src]
&self,
root: &H::Out,
functor: &mut dyn FnMut(&HashMap<Option<PrefixedStorageKey>, HashSet<StorageKey>>)
) -> bool
fn get(
&self,
key: &H::Out,
prefix: Prefix<'_>
) -> Result<Option<DBValue>, String>
[src]
&self,
key: &H::Out,
prefix: Prefix<'_>
) -> Result<Option<DBValue>, String>
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,
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,
H: UnwindSafe,
Number: RefUnwindSafe + UnwindSafe,
<H as Hasher>::Out: RefUnwindSafe + UnwindSafe,
Blanket Implementations
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, Outer> IsWrappedBy<Outer> for T where
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
[src]
impl<T, Outer> IsWrappedBy<Outer> for T where
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
[src]impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
[src]
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
[src]