pub struct MemoryStateStore { /* private fields */ }Available on crate feature
std only.Expand description
Thread-safe in-memory StateStore for tests and ephemeral runtimes.
Implementations§
Trait Implementations§
Source§impl Debug for MemoryStateStore
impl Debug for MemoryStateStore
Source§impl Default for MemoryStateStore
impl Default for MemoryStateStore
Source§impl StateStore for MemoryStateStore
impl StateStore for MemoryStateStore
Source§fn load_snapshot(&self) -> Result<Option<KernelSnapshot>>
fn load_snapshot(&self) -> Result<Option<KernelSnapshot>>
Load the latest persisted snapshot, or
Ok(None) if no state exists yet.Source§fn save_snapshot(&self, snapshot: &KernelSnapshot) -> Result<()>
fn save_snapshot(&self, snapshot: &KernelSnapshot) -> Result<()>
Persist a snapshot atomically to the backing store.
Auto Trait Implementations§
impl !Freeze for MemoryStateStore
impl Forget for MemoryStateStore
impl Move for MemoryStateStore
impl RefUnwindSafe for MemoryStateStore
impl Send for MemoryStateStore
impl Sync for MemoryStateStore
impl Unpin for MemoryStateStorewhere
Align4<u32>: Unpin,
Align1<u8>: Unpin,
*const LeafNode<String, f64> is !null: Unpin,
Box<(String, f64)>: Unpin,
*const u8 is !null: Unpin,
NonZero<i32>: Unpin,
Utc: Unpin,
*const LeafNode<String, Strategy> is !null: Unpin,
Box<(String, Strategy)>: Unpin,
*const LeafNode<String, String> is !null: Unpin,
Box<(String, String)>: Unpin,
*const LeafNode<String, PersistedProposalRecord> is !null: Unpin,
Box<(String, PersistedProposalRecord)>: Unpin,
*const LeafNode<String, PersistedRequestRecord> is !null: Unpin,
Box<(String, PersistedRequestRecord)>: Unpin,
*const LeafNode<String, PersistedFeedbackRecord> is !null: Unpin,
Box<(String, PersistedFeedbackRecord)>: Unpin,
*const LeafNode<String, SetValZST> is !null: Unpin,
Box<(String, SetValZST)>: Unpin,
impl UnsafeUnpin for MemoryStateStorewhere
Align4<u32>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const LeafNode<String, f64> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, f64)>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<Case>: UnsafeUnpin,
*const LeafNode<String, Strategy> is !null: UnsafeUnpin,
PhantomData<Box<(String, Strategy)>>: UnsafeUnpin,
*const LeafNode<String, String> is !null: UnsafeUnpin,
PhantomData<Box<(String, String)>>: UnsafeUnpin,
PhantomData<(CognitivePatch, String)>: UnsafeUnpin,
PhantomData<MetaMetrics>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<MetaCacheEntry>: UnsafeUnpin,
PhantomData<f64>: UnsafeUnpin,
*const LeafNode<String, PersistedProposalRecord> is !null: UnsafeUnpin,
PhantomData<Box<(String, PersistedProposalRecord)>>: UnsafeUnpin,
*const LeafNode<String, PersistedRequestRecord> is !null: UnsafeUnpin,
PhantomData<Box<(String, PersistedRequestRecord)>>: UnsafeUnpin,
*const LeafNode<String, PersistedFeedbackRecord> is !null: UnsafeUnpin,
PhantomData<Box<(String, PersistedFeedbackRecord)>>: UnsafeUnpin,
*const LeafNode<String, SetValZST> is !null: UnsafeUnpin,
PhantomData<Box<(String, SetValZST)>>: UnsafeUnpin,
impl UnwindSafe for MemoryStateStore
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