[−][src]Struct sp_state_machine::Ext
Wraps a read-only backend, call executor, and current overlayed changes.
Fields
id: u16
Pseudo-unique id used for tracing.
Methods
impl<'a, H, N, B, T> Ext<'a, H, N, B, T> where
H: Hasher<Out = H256>,
B: 'a + Backend<H>,
T: 'a + ChangesTrieStorage<H, N>,
N: BlockNumber,
[src]
H: Hasher<Out = H256>,
B: 'a + Backend<H>,
T: 'a + ChangesTrieStorage<H, N>,
N: BlockNumber,
pub fn new(
overlay: &'a mut OverlayedChanges,
backend: &'a B,
changes_trie_storage: Option<&'a T>,
extensions: Option<&'a mut Extensions>
) -> Self
[src]
overlay: &'a mut OverlayedChanges,
backend: &'a B,
changes_trie_storage: Option<&'a T>,
extensions: Option<&'a mut Extensions>
) -> Self
Create a new Ext
from overlayed changes and read-only backend
pub fn transaction(
&mut self
) -> ((B::Transaction, H256), Option<ChangesTrieTransaction<H, N>>)
[src]
&mut self
) -> ((B::Transaction, H256), Option<ChangesTrieTransaction<H, N>>)
Get the transaction necessary to update the backend.
Trait Implementations
impl<'a, H, B, T, N> ExtensionStore for Ext<'a, H, N, B, T> where
H: Hasher<Out = H256>,
B: 'a + Backend<H>,
T: 'a + ChangesTrieStorage<H, N>,
N: BlockNumber,
[src]
H: Hasher<Out = H256>,
B: 'a + Backend<H>,
T: 'a + ChangesTrieStorage<H, N>,
N: BlockNumber,
fn extension_by_type_id(&mut self, type_id: TypeId) -> Option<&mut dyn Any>
[src]
impl<'a, H, B, T, N> Externalities for Ext<'a, H, N, B, T> where
H: Hasher<Out = H256>,
B: 'a + Backend<H>,
T: 'a + ChangesTrieStorage<H, N>,
N: BlockNumber,
[src]
H: Hasher<Out = H256>,
B: 'a + Backend<H>,
T: 'a + ChangesTrieStorage<H, N>,
N: BlockNumber,
fn storage(&self, key: &[u8]) -> Option<Vec<u8>>
[src]
fn storage_hash(&self, key: &[u8]) -> Option<Vec<u8>>
[src]
fn original_storage(&self, key: &[u8]) -> Option<Vec<u8>>
[src]
fn original_storage_hash(&self, key: &[u8]) -> Option<Vec<u8>>
[src]
fn child_storage(
&self,
storage_key: ChildStorageKey,
child_info: ChildInfo,
key: &[u8]
) -> Option<Vec<u8>>
[src]
&self,
storage_key: ChildStorageKey,
child_info: ChildInfo,
key: &[u8]
) -> Option<Vec<u8>>
fn child_storage_hash(
&self,
storage_key: ChildStorageKey,
_child_info: ChildInfo,
key: &[u8]
) -> Option<Vec<u8>>
[src]
&self,
storage_key: ChildStorageKey,
_child_info: ChildInfo,
key: &[u8]
) -> Option<Vec<u8>>
fn original_child_storage(
&self,
storage_key: ChildStorageKey,
child_info: ChildInfo,
key: &[u8]
) -> Option<Vec<u8>>
[src]
&self,
storage_key: ChildStorageKey,
child_info: ChildInfo,
key: &[u8]
) -> Option<Vec<u8>>
fn original_child_storage_hash(
&self,
storage_key: ChildStorageKey,
child_info: ChildInfo,
key: &[u8]
) -> Option<Vec<u8>>
[src]
&self,
storage_key: ChildStorageKey,
child_info: ChildInfo,
key: &[u8]
) -> Option<Vec<u8>>
fn exists_storage(&self, key: &[u8]) -> bool
[src]
fn exists_child_storage(
&self,
storage_key: ChildStorageKey,
child_info: ChildInfo,
key: &[u8]
) -> bool
[src]
&self,
storage_key: ChildStorageKey,
child_info: ChildInfo,
key: &[u8]
) -> bool
fn next_storage_key(&self, key: &[u8]) -> Option<Vec<u8>>
[src]
fn next_child_storage_key(
&self,
storage_key: ChildStorageKey,
child_info: ChildInfo,
key: &[u8]
) -> Option<Vec<u8>>
[src]
&self,
storage_key: ChildStorageKey,
child_info: ChildInfo,
key: &[u8]
) -> Option<Vec<u8>>
fn place_storage(&mut self, key: Vec<u8>, value: Option<Vec<u8>>)
[src]
fn place_child_storage(
&mut self,
storage_key: ChildStorageKey,
child_info: ChildInfo,
key: Vec<u8>,
value: Option<Vec<u8>>
)
[src]
&mut self,
storage_key: ChildStorageKey,
child_info: ChildInfo,
key: Vec<u8>,
value: Option<Vec<u8>>
)
fn kill_child_storage(
&mut self,
storage_key: ChildStorageKey,
child_info: ChildInfo
)
[src]
&mut self,
storage_key: ChildStorageKey,
child_info: ChildInfo
)
fn clear_prefix(&mut self, prefix: &[u8])
[src]
fn clear_child_prefix(
&mut self,
storage_key: ChildStorageKey,
child_info: ChildInfo,
prefix: &[u8]
)
[src]
&mut self,
storage_key: ChildStorageKey,
child_info: ChildInfo,
prefix: &[u8]
)
fn chain_id(&self) -> u64
[src]
fn storage_root(&mut self) -> Vec<u8>
[src]
fn child_storage_root(&mut self, storage_key: ChildStorageKey) -> Vec<u8>
[src]
fn storage_changes_root(
&mut self,
parent_hash: &[u8]
) -> Result<Option<Vec<u8>>, ()>
[src]
&mut self,
parent_hash: &[u8]
) -> Result<Option<Vec<u8>>, ()>
fn set_storage(&mut self, key: Vec<u8>, value: Vec<u8>)
[src]
fn set_child_storage(
&mut self,
storage_key: ChildStorageKey,
child_info: ChildInfo,
key: Vec<u8>,
value: Vec<u8>
)
[src]
&mut self,
storage_key: ChildStorageKey,
child_info: ChildInfo,
key: Vec<u8>,
value: Vec<u8>
)
fn clear_storage(&mut self, key: &[u8])
[src]
fn clear_child_storage(
&mut self,
storage_key: ChildStorageKey,
child_info: ChildInfo,
key: &[u8]
)
[src]
&mut self,
storage_key: ChildStorageKey,
child_info: ChildInfo,
key: &[u8]
)
Auto Trait Implementations
impl<'a, H, N, B, T> !RefUnwindSafe for Ext<'a, H, N, B, T>
impl<'a, H, N, B, T> Send for Ext<'a, H, N, B, T> where
B: Sync,
N: Send,
T: Sync,
<B as Backend<H>>::Transaction: Send,
B: Sync,
N: Send,
T: Sync,
<B as Backend<H>>::Transaction: Send,
impl<'a, H, N, B, T> !Sync for Ext<'a, H, N, B, T>
impl<'a, H, N, B, T> Unpin for Ext<'a, H, N, B, T> where
H: Unpin,
N: Unpin,
<B as Backend<H>>::Transaction: Unpin,
H: Unpin,
N: Unpin,
<B as Backend<H>>::Transaction: Unpin,
impl<'a, H, N, B, T> !UnwindSafe for Ext<'a, H, N, B, T>
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>,