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 Freeze for TestPersistentOffchainDB
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> 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
.