pub struct InMemoryMetadataStore { /* private fields */ }Expand description
In-memory persistent metadata store.
“Persistent” is aspirational here — the values survive Arc<...> clones
but reset to empty on process restart. Used when no SQLite mob storage
is configured. The structural-events subscription falls back to “start
at latest” on restart in this case, which is the right behaviour:
in-memory deployments don’t have a persistent ledger to replay against
either.
Implementations§
Trait Implementations§
Source§impl Debug for InMemoryMetadataStore
impl Debug for InMemoryMetadataStore
Source§impl Default for InMemoryMetadataStore
impl Default for InMemoryMetadataStore
Source§fn default() -> InMemoryMetadataStore
fn default() -> InMemoryMetadataStore
Returns the “default value” for a type. Read more
Source§impl PersistentMetadataStore for InMemoryMetadataStore
impl PersistentMetadataStore for InMemoryMetadataStore
Source§fn get_subscription_cursor<'life0, 'life1, 'async_trait>(
&'life0 self,
mob_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<u64>, MetadataStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_subscription_cursor<'life0, 'life1, 'async_trait>(
&'life0 self,
mob_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<u64>, MetadataStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Read the last-projected mob events cursor for
mob_id. Returns
Ok(None) when no cursor has been written yet (fresh deploy or
in-memory deployment that just started).Source§fn set_subscription_cursor<'life0, 'life1, 'async_trait>(
&'life0 self,
mob_id: &'life1 str,
cursor: u64,
) -> Pin<Box<dyn Future<Output = Result<(), MetadataStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set_subscription_cursor<'life0, 'life1, 'async_trait>(
&'life0 self,
mob_id: &'life1 str,
cursor: u64,
) -> Pin<Box<dyn Future<Output = Result<(), MetadataStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Persist the last-projected mob events cursor for
mob_id.Auto Trait Implementations§
impl !Freeze for InMemoryMetadataStore
impl !RefUnwindSafe for InMemoryMetadataStore
impl Send for InMemoryMetadataStore
impl Sync for InMemoryMetadataStore
impl Unpin for InMemoryMetadataStore
impl UnsafeUnpin for InMemoryMetadataStore
impl !UnwindSafe for InMemoryMetadataStore
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> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more