[−][src]Struct sp_state_machine::BasicExternalities
Simple Map-based Externalities impl.
Implementations
impl BasicExternalities[src][−]
pub fn new(inner: Storage) -> Self[src][−]
Create a new instance of BasicExternalities
pub fn new_empty() -> Self[src][−]
New basic externalities with empty storage.
pub fn with_tasks_executor() -> Self[src][−]
New basic extternalities with tasks executor.
pub fn insert(&mut self, k: StorageKey, v: StorageValue) -> Option<StorageValue>[src][−]
Insert key/value
pub fn into_storages(self) -> Storage[src][−]
Consume self and returns inner storages
pub fn execute_with_storage<R>(
storage: &mut Storage,
f: impl FnOnce() -> R
) -> R[src][−]
storage: &mut Storage,
f: impl FnOnce() -> R
) -> R
Execute the given closure f with the externalities set and initialized with storage.
Returns the result of the closure and updates storage with all changes.
pub fn execute_with<R>(&mut self, f: impl FnOnce() -> R) -> R[src][−]
Execute the given closure while self is set as externalities.
Returns the result of the given closure.
pub fn extensions(&mut self) -> &mut Extensions[src][−]
List of active extensions.
Trait Implementations
impl Debug for BasicExternalities[src][+]
impl Default for BasicExternalities[src][+]
impl ExtensionStore for BasicExternalities[src][+]
impl Externalities for BasicExternalities[src][+]
impl From<BTreeMap<Vec<u8>, Vec<u8>>> for BasicExternalities[src][+]
impl FromIterator<(Vec<u8>, Vec<u8>)> for BasicExternalities[src][+]
impl PartialEq<BasicExternalities> for BasicExternalities[src][+]
Auto Trait Implementations
impl !RefUnwindSafe for BasicExternalities
impl Send for BasicExternalities
impl !Sync for BasicExternalities
impl Unpin for BasicExternalities
impl !UnwindSafe for BasicExternalities
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,
impl<T> Clear for T where
T: InitializableFromZeroed + ?Sized, [src][+]
T: InitializableFromZeroed + ?Sized,
impl<T> From<T> for T[src][+]
impl<T> InitializableFromZeroed for T where
T: Default, [src][+]
T: Default,
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>,
impl<T> MaybeDebug for T where
T: Debug, [src]
T: Debug,
impl<T> MaybeDebug for T where
T: Debug, [src]
T: Debug,
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>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src][+]
U: TryFrom<T>,
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>, [src][+]
T: UncheckedFrom<S>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>, [src][+]
V: MultiLane<T>,