Struct sp_core::offchain::testing::TestPersistentOffchainDB
source · pub struct TestPersistentOffchainDB { /* private fields */ }
Expand description
Sharable “persistent” offchain storage for test.
Implementations§
source§impl TestPersistentOffchainDB
impl TestPersistentOffchainDB
sourcepub fn apply_offchain_changes(
&mut self,
changes: impl Iterator<Item = ((Vec<u8>, Vec<u8>), OffchainOverlayedChange)>
)
pub fn apply_offchain_changes( &mut self, changes: impl Iterator<Item = ((Vec<u8>, Vec<u8>), OffchainOverlayedChange)> )
Apply a set of off-chain changes directly to the test backend
Trait Implementations§
source§impl Clone for TestPersistentOffchainDB
impl Clone for TestPersistentOffchainDB
source§fn clone(&self) -> TestPersistentOffchainDB
fn clone(&self) -> TestPersistentOffchainDB
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TestPersistentOffchainDB
impl Debug for TestPersistentOffchainDB
source§impl Default for TestPersistentOffchainDB
impl Default for TestPersistentOffchainDB
source§fn default() -> TestPersistentOffchainDB
fn default() -> TestPersistentOffchainDB
Returns the “default value” for a type. Read more
source§impl OffchainStorage for TestPersistentOffchainDB
impl OffchainStorage for TestPersistentOffchainDB
source§fn set(&mut self, prefix: &[u8], key: &[u8], value: &[u8])
fn set(&mut self, prefix: &[u8], key: &[u8], value: &[u8])
Persist a value in storage under given key and prefix.
source§fn remove(&mut self, prefix: &[u8], key: &[u8])
fn remove(&mut self, prefix: &[u8], key: &[u8])
Clear a storage entry under given key and prefix.
Auto Trait Implementations§
impl !RefUnwindSafe for TestPersistentOffchainDB
impl Send for TestPersistentOffchainDB
impl Sync for TestPersistentOffchainDB
impl Unpin for TestPersistentOffchainDB
impl !UnwindSafe for TestPersistentOffchainDB
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T, Outer> IsWrappedBy<Outer> for Twhere
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for Twhere Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere T: UncheckedFrom<S>,
source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from
.