Struct eventually::aggregate::repository::EventSourced
source · pub struct EventSourced<T, S>{ /* private fields */ }
Expand description
An Event-sourced implementation of the Repository interface.
It uses an Event Store instance to stream Domain Events for a particular Aggregate, and append uncommitted Domain Events recorded by an Aggregate Root.
Trait Implementations§
source§impl<T, S> Clone for EventSourced<T, S>
impl<T, S> Clone for EventSourced<T, S>
source§fn clone(&self) -> EventSourced<T, S>
fn clone(&self) -> EventSourced<T, S>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T, S> Debug for EventSourced<T, S>
impl<T, S> Debug for EventSourced<T, S>
source§impl<T, S> From<S> for EventSourced<T, S>
impl<T, S> From<S> for EventSourced<T, S>
source§impl<T, S> Getter<T> for EventSourced<T, S>
impl<T, S> Getter<T> for EventSourced<T, S>
source§fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 T::Id
) -> Pin<Box<dyn Future<Output = Result<Root<T>, GetError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 T::Id
) -> Pin<Box<dyn Future<Output = Result<Root<T>, GetError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads an aggregate::Root instance from the data store,
referenced by its unique identifier.
source§impl<T, S> Saver<T> for EventSourced<T, S>
impl<T, S> Saver<T> for EventSourced<T, S>
source§fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
root: &'life1 mut Root<T>
) -> Pin<Box<dyn Future<Output = Result<(), SaveError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
root: &'life1 mut Root<T>
) -> Pin<Box<dyn Future<Output = Result<(), SaveError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Saves a new version of an aggregate::Root instance to the data store.
Auto Trait Implementations§
impl<T, S> RefUnwindSafe for EventSourced<T, S>where
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, S> Send for EventSourced<T, S>
impl<T, S> Sync for EventSourced<T, S>
impl<T, S> Unpin for EventSourced<T, S>
impl<T, S> UnwindSafe for EventSourced<T, S>where
S: UnwindSafe,
T: UnwindSafe,
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