pub struct InMemoryPersist<A>where
A: Aggregate,{ /* private fields */ }Implementations§
Trait Implementations§
Source§impl<A> Clone for InMemoryPersist<A>
impl<A> Clone for InMemoryPersist<A>
Source§fn clone(&self) -> InMemoryPersist<A>
fn clone(&self) -> InMemoryPersist<A>
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<A> Debug for InMemoryPersist<A>
impl<A> Debug for InMemoryPersist<A>
Source§impl<A> Default for InMemoryPersist<A>
impl<A> Default for InMemoryPersist<A>
Source§fn default() -> InMemoryPersist<A>
fn default() -> InMemoryPersist<A>
Returns the “default value” for a type. Read more
Source§impl<A> EventStoreStorage<A> for InMemoryPersist<A>where
A: Aggregate + 'static,
impl<A> EventStoreStorage<A> for InMemoryPersist<A>where
A: Aggregate + 'static,
type Session = (OwnedMutexGuard<HashMap<String, Snapshot<A>>>, OwnedMutexGuard<HashMap<String, Vec<EventEnvelope<A>>>>)
fn start_session<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Session, CqrsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close_session<'life0, 'async_trait>(
&'life0 self,
_session: Self::Session,
) -> Pin<Box<dyn Future<Output = Result<(), CqrsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fetch_snapshot<'life0, 'life1, 'async_trait>(
&'life0 self,
aggregate_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Snapshot<A>>, CqrsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fetch_events_from_version<'life0, 'life1, 'async_trait>(
&'life0 self,
aggregate_id: &'life1 str,
version: usize,
) -> Pin<Box<dyn Future<Output = Result<EventStream<A>, CqrsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fetch_all_events<'life0, 'life1, 'async_trait>(
&'life0 self,
aggregate_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<EventStream<A>, CqrsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fetch_events_paged<'life0, 'life1, 'async_trait>(
&'life0 self,
aggregate_id: &'life1 str,
page: usize,
page_size: usize,
) -> Pin<Box<dyn Future<Output = Result<(Vec<EventEnvelope<A>>, i64), CqrsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fetch_latest_event<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
aggregate: &'life1 A,
session: &'life2 Self::Session,
) -> Pin<Box<dyn Future<Output = Result<Option<EventEnvelope<A>>, CqrsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn save_events<'life0, 'life1, 'async_trait>(
&'life0 self,
events: Vec<EventEnvelope<A>>,
session: &'life1 mut Self::Session,
) -> Pin<Box<dyn Future<Output = Result<(), CqrsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_snapshot<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
aggregate: &'life1 A,
version: usize,
session: &'life2 mut Self::Session,
) -> Pin<Box<dyn Future<Output = Result<(), CqrsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn abort_session<'life0, 'async_trait>(
&'life0 self,
_session: Self::Session,
) -> Pin<Box<dyn Future<Output = Result<(), CqrsError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl<A> Freeze for InMemoryPersist<A>
impl<A> !RefUnwindSafe for InMemoryPersist<A>
impl<A> Send for InMemoryPersist<A>
impl<A> Sync for InMemoryPersist<A>
impl<A> Unpin for InMemoryPersist<A>where
A: Unpin,
impl<A> UnsafeUnpin for InMemoryPersist<A>
impl<A> !UnwindSafe for InMemoryPersist<A>
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