pub struct InMemoryEventStore { /* private fields */ }Expand description
In-memory event store implementation.
Implementations§
Trait Implementations§
Source§impl Debug for InMemoryEventStore
impl Debug for InMemoryEventStore
Source§impl EventStore for InMemoryEventStore
impl EventStore for InMemoryEventStore
Source§fn store_event<'life0, 'async_trait>(
&'life0 self,
event: StoredEvent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn store_event<'life0, 'async_trait>(
&'life0 self,
event: StoredEvent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Store an event with its metadata.
Source§fn get_events_since<'life0, 'life1, 'async_trait>(
&'life0 self,
event_id: &'life1 str,
limit: Option<usize>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StoredEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_events_since<'life0, 'life1, 'async_trait>(
&'life0 self,
event_id: &'life1 str,
limit: Option<usize>,
) -> Pin<Box<dyn Future<Output = Result<Vec<StoredEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieve events since a given event ID.
Source§fn get_latest_event_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_latest_event_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the latest event ID.
Source§fn clear_events_before<'life0, 'async_trait>(
&'life0 self,
timestamp: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear_events_before<'life0, 'async_trait>(
&'life0 self,
timestamp: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Clear events older than the specified timestamp.
Source§fn create_resumption_token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ResumptionToken>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_resumption_token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ResumptionToken>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get resumption token for current state.
Source§fn validate_resumption_token<'life0, 'life1, 'async_trait>(
&'life0 self,
token: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ResumptionState>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn validate_resumption_token<'life0, 'life1, 'async_trait>(
&'life0 self,
token: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ResumptionState>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Validate and retrieve state from resumption token.
Auto Trait Implementations§
impl !RefUnwindSafe for InMemoryEventStore
impl !UnwindSafe for InMemoryEventStore
impl Freeze for InMemoryEventStore
impl Send for InMemoryEventStore
impl Sync for InMemoryEventStore
impl Unpin for InMemoryEventStore
impl UnsafeUnpin for InMemoryEventStore
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