pub struct MemoryManager { /* private fields */ }Expand description
In-memory database manager backed by a shared Arc<RwLock<...>>.
All collections and state stores created by the same MemoryManager instance
share the underlying HashMap, so data survives across handle clones just
as it would with a real database.
Trait Implementations§
Source§impl Clone for MemoryManager
impl Clone for MemoryManager
Source§fn clone(&self) -> MemoryManager
fn clone(&self) -> MemoryManager
Returns a duplicate 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 DbManager<MemoryStore, MemoryStore> for MemoryManager
impl DbManager<MemoryStore, MemoryStore> for MemoryManager
Source§fn create_state(&self, name: &str, prefix: &str) -> Result<MemoryStore, Error>
fn create_state(&self, name: &str, prefix: &str) -> Result<MemoryStore, Error>
Creates a single-value state store, typically used to store actor snapshots. Read more
Source§fn stop(&mut self) -> Result<(), Error>
fn stop(&mut self) -> Result<(), Error>
Optional cleanup hook called when the database manager should shut down. Read more
Source§fn create_collection(
&self,
name: &str,
prefix: &str,
) -> Result<MemoryStore, Error>
fn create_collection( &self, name: &str, prefix: &str, ) -> Result<MemoryStore, Error>
Creates a new ordered key-value collection, typically used to store events. Read more
Source§impl Default for MemoryManager
impl Default for MemoryManager
Source§fn default() -> MemoryManager
fn default() -> MemoryManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MemoryManager
impl RefUnwindSafe for MemoryManager
impl Send for MemoryManager
impl Sync for MemoryManager
impl Unpin for MemoryManager
impl UnsafeUnpin for MemoryManager
impl UnwindSafe for MemoryManager
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