pub trait Getter<T>: Send + Sync
where T: Aggregate,
{ // Required method 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; }
Expand description

Trait used to implement read access to a data store from which to load an aggregate::Root instance, given its id.

Required Methods§

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,

Loads an aggregate::Root instance from the data store, referenced by its unique identifier.

Implementors§

source§

impl<T, Inner> Getter<T> for InstrumentedAggregateRepository<T, Inner>
where T: Aggregate + Debug, <T as Aggregate>::Id: Debug, <T as Aggregate>::Event: Debug, Inner: Repository<T>,

source§

impl<T, S> Getter<T> for EventSourced<T, S>
where T: Aggregate, T::Id: Clone, T::Error: Error + Send + Sync + 'static, S: Store<T::Id, T::Event>, <S as Streamer<T::Id, T::Event>>::Error: Error + Send + Sync + 'static,