pub struct MemoryDurableStateStore { /* private fields */ }Expand description
In-memory durable-state reference implementation.
The query view retains only the latest revision for each id. Rapid writes therefore coalesce naturally while the latest revision remains observable.
Implementations§
Trait Implementations§
Source§impl Clone for MemoryDurableStateStore
impl Clone for MemoryDurableStateStore
Source§fn clone(&self) -> MemoryDurableStateStore
fn clone(&self) -> MemoryDurableStateStore
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 MemoryDurableStateStore
impl Debug for MemoryDurableStateStore
Source§impl Default for MemoryDurableStateStore
impl Default for MemoryDurableStateStore
Source§impl DurableStateChangesQuery for MemoryDurableStateStore
impl DurableStateChangesQuery for MemoryDurableStateStore
Source§fn changes<'life0, 'life1, 'async_trait>(
&'life0 self,
tag: &'life1 Tag,
offset: Offset,
mode: QueryMode,
) -> Pin<Box<dyn Future<Output = PersistenceResult<QueryStream<DurableStateChange>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn changes<'life0, 'life1, 'async_trait>(
&'life0 self,
tag: &'life1 Tag,
offset: Offset,
mode: QueryMode,
) -> Pin<Box<dyn Future<Output = PersistenceResult<QueryStream<DurableStateChange>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl DurableStateStore for MemoryDurableStateStore
impl DurableStateStore for MemoryDurableStateStore
Source§fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
persistence_id: &'life1 PersistenceId,
) -> Pin<Box<dyn Future<Output = PersistenceResult<VersionedState>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
persistence_id: &'life1 PersistenceId,
) -> Pin<Box<dyn Future<Output = PersistenceResult<VersionedState>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Gets the latest value and revision. Unknown ids return absent state at
revision zero.
Source§fn upsert<'life0, 'life1, 'async_trait>(
&'life0 self,
persistence_id: &'life1 PersistenceId,
new_revision: Revision,
state_payload: SerializedPayload,
tag: Option<Tag>,
) -> Pin<Box<dyn Future<Output = PersistenceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn upsert<'life0, 'life1, 'async_trait>(
&'life0 self,
persistence_id: &'life1 PersistenceId,
new_revision: Revision,
state_payload: SerializedPayload,
tag: Option<Tag>,
) -> Pin<Box<dyn Future<Output = PersistenceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
persistence_id: &'life1 PersistenceId,
new_revision: Revision,
) -> Pin<Box<dyn Future<Output = PersistenceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
persistence_id: &'life1 PersistenceId,
new_revision: Revision,
) -> Pin<Box<dyn Future<Output = PersistenceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Advances the revision under the same CAS rule, clears the tag, and leaves
a tombstone.
Auto Trait Implementations§
impl Freeze for MemoryDurableStateStore
impl RefUnwindSafe for MemoryDurableStateStore
impl Send for MemoryDurableStateStore
impl Sync for MemoryDurableStateStore
impl Unpin for MemoryDurableStateStore
impl UnsafeUnpin for MemoryDurableStateStore
impl UnwindSafe for MemoryDurableStateStore
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> 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<S> IntoEventHandlerResult<S> for S
impl<S> IntoEventHandlerResult<S> for S
Source§fn into_event_handler_result(self) -> Result<S, PersistenceError>
fn into_event_handler_result(self) -> Result<S, PersistenceError>
Converts this handler output into the runtime result.
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