[−][src]Struct sp_state_machine::InMemoryChangesTrieStorage
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]
&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]
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]
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> where
<H as Hasher>::Out: Send,
<H as Hasher>::Out: Send,
impl<H, Number> Sync for InMemoryStorage<H, Number> where
<H as Hasher>::Out: Send + Sync,
<H as Hasher>::Out: Send + Sync,
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
[src]
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
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> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
[src]
T: UncheckedFrom<S>,
fn unchecked_into(self) -> T
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,