pub struct InMemoryStore { /* private fields */ }Expand description
In-memory remembered entity store.
This store is intended for tests and single-process development. It survives
shard rebalance when all regions share the same InMemoryStore value, but it
is process memory and does not survive process death.
Implementations§
Source§impl InMemoryStore
impl InMemoryStore
Trait Implementations§
Source§impl Clone for InMemoryStore
impl Clone for InMemoryStore
Source§fn clone(&self) -> InMemoryStore
fn clone(&self) -> InMemoryStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 InMemoryStore
impl Debug for InMemoryStore
Source§impl Default for InMemoryStore
impl Default for InMemoryStore
Source§fn default() -> InMemoryStore
fn default() -> InMemoryStore
Returns the “default value” for a type. Read more
Source§impl RememberEntitiesStore for InMemoryStore
impl RememberEntitiesStore for InMemoryStore
Source§fn record_entity_started<'a>(
&'a self,
type_name: &'a str,
shard_id: &'a str,
entity_id: &'a str,
) -> RememberEntitiesStoreFuture<'a, RememberEntitiesStoreResult<()>>
fn record_entity_started<'a>( &'a self, type_name: &'a str, shard_id: &'a str, entity_id: &'a str, ) -> RememberEntitiesStoreFuture<'a, RememberEntitiesStoreResult<()>>
Record that
entity_id has started in type_name/shard_id.Source§fn record_entity_stopped<'a>(
&'a self,
type_name: &'a str,
shard_id: &'a str,
entity_id: &'a str,
) -> RememberEntitiesStoreFuture<'a, RememberEntitiesStoreResult<()>>
fn record_entity_stopped<'a>( &'a self, type_name: &'a str, shard_id: &'a str, entity_id: &'a str, ) -> RememberEntitiesStoreFuture<'a, RememberEntitiesStoreResult<()>>
Record that
entity_id has stopped/passivated in type_name/shard_id.Source§fn list_entities_for_shard<'a>(
&'a self,
type_name: &'a str,
shard_id: &'a str,
) -> RememberEntitiesStoreFuture<'a, RememberEntitiesStoreResult<Vec<String>>>
fn list_entities_for_shard<'a>( &'a self, type_name: &'a str, shard_id: &'a str, ) -> RememberEntitiesStoreFuture<'a, RememberEntitiesStoreResult<Vec<String>>>
Return remembered entity ids for one shard.
Source§fn list_shards<'a>(
&'a self,
type_name: &'a str,
) -> RememberEntitiesStoreFuture<'a, RememberEntitiesStoreResult<Vec<String>>>
fn list_shards<'a>( &'a self, type_name: &'a str, ) -> RememberEntitiesStoreFuture<'a, RememberEntitiesStoreResult<Vec<String>>>
Return shards known to the store for one entity type.
Source§fn flush<'a>(
&'a self,
) -> RememberEntitiesStoreFuture<'a, RememberEntitiesStoreResult<()>>
fn flush<'a>( &'a self, ) -> RememberEntitiesStoreFuture<'a, RememberEntitiesStoreResult<()>>
Synchronise outstanding writes so a resolved
RememberEntitiesRuntime::flush
makes prior starts/stops visible to a reader that opens the store after the
flush resolves (e.g., a node restart).Auto Trait Implementations§
impl Freeze for InMemoryStore
impl RefUnwindSafe for InMemoryStore
impl Send for InMemoryStore
impl Sync for InMemoryStore
impl Unpin for InMemoryStore
impl UnsafeUnpin for InMemoryStore
impl UnwindSafe for InMemoryStore
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> Message for T
impl<T> Message for T
Source§fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
Convert a BoxedMessage to this concrete type
Source§fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
Convert this message to a BoxedMessage