pub struct MemoryStorage<S> { /* private fields */ }Expand description
In-memory storage for testing (simulates durable storage)
Implementations§
Trait Implementations§
Source§impl<S: Debug> Debug for MemoryStorage<S>
impl<S: Debug> Debug for MemoryStorage<S>
Source§impl<S: Default> Default for MemoryStorage<S>
impl<S: Default> Default for MemoryStorage<S>
Source§fn default() -> MemoryStorage<S>
fn default() -> MemoryStorage<S>
Returns the “default value” for a type. Read more
Source§impl<S: Lattice + Clone + Serialize + for<'de> Deserialize<'de>> DurableStorage<S> for MemoryStorage<S>
impl<S: Lattice + Clone + Serialize + for<'de> Deserialize<'de>> DurableStorage<S> for MemoryStorage<S>
Source§fn persist(&mut self, state: &DurableState<S>) -> Result<(), StorageError>
fn persist(&mut self, state: &DurableState<S>) -> Result<(), StorageError>
Persist the durable state
Source§fn load(
&self,
replica_id: &str,
) -> Result<Option<DurableState<S>>, StorageError>
fn load( &self, replica_id: &str, ) -> Result<Option<DurableState<S>>, StorageError>
Load the durable state
Auto Trait Implementations§
impl<S> Freeze for MemoryStorage<S>
impl<S> RefUnwindSafe for MemoryStorage<S>where
S: RefUnwindSafe,
impl<S> Send for MemoryStorage<S>where
S: Send,
impl<S> Sync for MemoryStorage<S>where
S: Sync,
impl<S> Unpin for MemoryStorage<S>where
S: Unpin,
impl<S> UnwindSafe for MemoryStorage<S>where
S: UnwindSafe,
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