Struct sp_state_machine::InMemoryChangesTrieStorage [−][src]
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>
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> 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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> 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, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, Outer> IsWrappedBy<Outer> for T where
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
[src]
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
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]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
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.
pub 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.
pub 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>,
pub fn unchecked_into(self) -> T
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,