[−][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.
Implementations
impl<'a, H, N, B> Ext<'a, H, N, B> where
H: Hasher,
B: Backend<H>,
N: BlockNumber,
[src]
H: Hasher,
B: Backend<H>,
N: BlockNumber,
pub fn new(
overlay: &'a mut OverlayedChanges,
offchain_overlay: &'a mut OffchainOverlayedChanges,
storage_transaction_cache: &'a mut StorageTransactionCache<B::Transaction, H, N>,
backend: &'a B,
changes_trie_state: Option<ChangesTrieState<'a, H, N>>,
extensions: Option<&'a mut Extensions>
) -> Self
[src]
overlay: &'a mut OverlayedChanges,
offchain_overlay: &'a mut OffchainOverlayedChanges,
storage_transaction_cache: &'a mut StorageTransactionCache<B::Transaction, H, N>,
backend: &'a B,
changes_trie_state: Option<ChangesTrieState<'a, H, N>>,
extensions: Option<&'a mut Extensions>
) -> Self
Create a new Ext
from overlayed changes and read-only backend
pub fn get_offchain_storage_changes(&self) -> &OffchainOverlayedChanges
[src]
Read only accessor for the scheduled overlay changes.
Trait Implementations
impl<'a, H, N, B> ExtensionStore for Ext<'a, H, N, B> where
H: Hasher,
B: 'a + Backend<H>,
N: BlockNumber,
[src]
H: Hasher,
B: 'a + Backend<H>,
N: BlockNumber,
pub fn extension_by_type_id(&mut self, type_id: TypeId) -> Option<&mut dyn Any>
[src]
pub fn register_extension_with_type_id(
&mut self,
type_id: TypeId,
extension: Box<dyn Extension>
) -> Result<(), Error>
[src]
&mut self,
type_id: TypeId,
extension: Box<dyn Extension>
) -> Result<(), Error>
pub fn deregister_extension_by_type_id(
&mut self,
type_id: TypeId
) -> Result<(), Error>
[src]
&mut self,
type_id: TypeId
) -> Result<(), Error>
impl<'a, H, N, B> Externalities for Ext<'a, H, N, B> where
H: Hasher,
H::Out: Ord + 'static + Codec,
B: Backend<H>,
N: BlockNumber,
[src]
H: Hasher,
H::Out: Ord + 'static + Codec,
B: Backend<H>,
N: BlockNumber,
pub fn set_offchain_storage(&mut self, key: &[u8], value: Option<&[u8]>)
[src]
pub fn storage(&self, key: &[u8]) -> Option<StorageValue>
[src]
pub fn storage_hash(&self, key: &[u8]) -> Option<Vec<u8>>
[src]
pub fn child_storage(
&self,
child_info: &ChildInfo,
key: &[u8]
) -> Option<StorageValue>
[src]
&self,
child_info: &ChildInfo,
key: &[u8]
) -> Option<StorageValue>
pub fn child_storage_hash(
&self,
child_info: &ChildInfo,
key: &[u8]
) -> Option<Vec<u8>>
[src]
&self,
child_info: &ChildInfo,
key: &[u8]
) -> Option<Vec<u8>>
pub fn exists_storage(&self, key: &[u8]) -> bool
[src]
pub fn exists_child_storage(&self, child_info: &ChildInfo, key: &[u8]) -> bool
[src]
pub fn next_storage_key(&self, key: &[u8]) -> Option<StorageKey>
[src]
pub fn next_child_storage_key(
&self,
child_info: &ChildInfo,
key: &[u8]
) -> Option<StorageKey>
[src]
&self,
child_info: &ChildInfo,
key: &[u8]
) -> Option<StorageKey>
pub fn place_storage(&mut self, key: StorageKey, value: Option<StorageValue>)
[src]
pub fn place_child_storage(
&mut self,
child_info: &ChildInfo,
key: StorageKey,
value: Option<StorageValue>
)
[src]
&mut self,
child_info: &ChildInfo,
key: StorageKey,
value: Option<StorageValue>
)
pub fn kill_child_storage(&mut self, child_info: &ChildInfo)
[src]
pub fn clear_prefix(&mut self, prefix: &[u8])
[src]
pub fn clear_child_prefix(&mut self, child_info: &ChildInfo, prefix: &[u8])
[src]
pub fn storage_append(&mut self, key: Vec<u8>, value: Vec<u8>)
[src]
pub fn chain_id(&self) -> u64
[src]
pub fn storage_root(&mut self) -> Vec<u8>
[src]
pub fn child_storage_root(&mut self, child_info: &ChildInfo) -> Vec<u8>
[src]
pub fn storage_changes_root(
&mut self,
parent_hash: &[u8]
) -> Result<Option<Vec<u8>>, ()>
[src]
&mut self,
parent_hash: &[u8]
) -> Result<Option<Vec<u8>>, ()>
pub fn storage_start_transaction(&mut self)
[src]
pub fn storage_rollback_transaction(&mut self) -> Result<(), ()>
[src]
pub fn storage_commit_transaction(&mut self) -> Result<(), ()>
[src]
pub fn wipe(&mut self)
[src]
pub fn commit(&mut self)
[src]
pub fn read_write_count(&self) -> (u32, u32, u32, u32)
[src]
pub fn reset_read_write_count(&mut self)
[src]
pub fn get_whitelist(&self) -> Vec<TrackedStorageKey>
[src]
pub fn set_whitelist(&mut self, new: Vec<TrackedStorageKey>)
[src]
pub fn set_storage(&mut self, key: Vec<u8, Global>, value: Vec<u8, Global>)
[src]
pub fn set_child_storage(
&mut self,
child_info: &ChildInfo,
key: Vec<u8, Global>,
value: Vec<u8, Global>
)
[src]
&mut self,
child_info: &ChildInfo,
key: Vec<u8, Global>,
value: Vec<u8, Global>
)
pub fn clear_storage(&mut self, key: &[u8])
[src]
pub fn clear_child_storage(&mut self, child_info: &ChildInfo, key: &[u8])
[src]
Auto Trait Implementations
impl<'a, H, N, B> !RefUnwindSafe for Ext<'a, H, N, B>
[src]
impl<'a, H, N, B> Send for Ext<'a, H, N, B> where
B: Sync,
<H as Hasher>::Out: Send,
<B as Backend<H>>::Transaction: Send,
[src]
B: Sync,
<H as Hasher>::Out: Send,
<B as Backend<H>>::Transaction: Send,
impl<'a, H, N, B> !Sync for Ext<'a, H, N, B>
[src]
impl<'a, H, N, B> Unpin for Ext<'a, H, N, B> where
N: Unpin,
[src]
N: Unpin,
impl<'a, H, N, B> !UnwindSafe for Ext<'a, H, N, B>
[src]
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> Same<T> for T
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>,
V: MultiLane<T>,