Struct sp_state_machine::OffchainOverlayedChanges [−][src]
pub struct OffchainOverlayedChanges(_);
In-memory storage for offchain workers recoding changes for the actual offchain storage implementation.
Implementations
impl OffchainOverlayedChanges
[src]
impl OffchainOverlayedChanges
[src]pub fn into_iter(
self
) -> impl Iterator<Item = ((Vec<u8>, Vec<u8>), OffchainOverlayedChange)>
[src]
self
) -> impl Iterator<Item = ((Vec<u8>, Vec<u8>), OffchainOverlayedChange)>
Consume the offchain storage and iterate over all key value pairs.
pub fn iter<'a>(
&'a self
) -> impl Iterator<Item = (&'a (Vec<u8>, Vec<u8>), &'a OffchainOverlayedChange)>
[src]
&'a self
) -> impl Iterator<Item = (&'a (Vec<u8>, Vec<u8>), &'a OffchainOverlayedChange)>
Iterate over all key value pairs by reference.
pub fn drain(
&mut self
) -> impl Iterator<Item = ((Vec<u8>, Vec<u8>), OffchainOverlayedChange)>
[src]
&mut self
) -> impl Iterator<Item = ((Vec<u8>, Vec<u8>), OffchainOverlayedChange)>
Drain all elements of changeset.
pub fn remove(&mut self, prefix: &[u8], key: &[u8])
[src]
Remove a key and its associated value from the offchain database.
pub fn set(&mut self, prefix: &[u8], key: &[u8], value: &[u8])
[src]
Set the value associated with a key under a prefix to the value provided.
pub fn get(&self, prefix: &[u8], key: &[u8]) -> Option<OffchainOverlayedChange>
[src]
Obtain a associated value to the given key in storage with prefix.
pub fn overlay(
&self
) -> &OverlayedMap<(Vec<u8>, Vec<u8>), OffchainOverlayedChange>
[src]
&self
) -> &OverlayedMap<(Vec<u8>, Vec<u8>), OffchainOverlayedChange>
Reference to inner change set.
pub fn overlay_mut(
&mut self
) -> &mut OverlayedMap<(Vec<u8>, Vec<u8>), OffchainOverlayedChange>
[src]
&mut self
) -> &mut OverlayedMap<(Vec<u8>, Vec<u8>), OffchainOverlayedChange>
Mutable reference to inner change set.
Trait Implementations
impl Clone for OffchainOverlayedChanges
[src]
impl Clone for OffchainOverlayedChanges
[src]fn clone(&self) -> OffchainOverlayedChanges
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for OffchainOverlayedChanges
[src]
impl Default for OffchainOverlayedChanges
[src]fn default() -> OffchainOverlayedChanges
[src]
Auto Trait Implementations
impl RefUnwindSafe for OffchainOverlayedChanges
impl Send for OffchainOverlayedChanges
impl Sync for OffchainOverlayedChanges
impl Unpin for OffchainOverlayedChanges
impl UnwindSafe for OffchainOverlayedChanges
Blanket Implementations
impl<T> Instrument 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, Outer> IsWrappedBy<Outer> for T where
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
[src]
impl<T, Outer> IsWrappedBy<Outer> for T where
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
[src]impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
[src]
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
[src]pub fn unchecked_into(self) -> T
[src]
impl<T> MaybeDebug for T where
T: Debug,
[src]
T: Debug,
impl<T> MaybeDebug for T where
T: Debug,
[src]
T: Debug,
impl<T> MaybeRefUnwindSafe for T where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,