[−][src]Trait cqrs::EventSource
A source for reading/loading events.
Associated Types
type Events: IntoIterator
Represents the sequence of events read from the event source.
type Error: CqrsError
The error type.
Required methods
fn read_events<I>(
&self,
id: &I,
since: Since,
max_count: Option<u64>
) -> Result<Option<Self::Events>, Self::Error> where
I: AggregateId<A>,
&self,
id: &I,
since: Since,
max_count: Option<u64>
) -> Result<Option<Self::Events>, Self::Error> where
I: AggregateId<A>,
Reads events from the event source for a given identifier.
Only loads events after the event number provided in since
(See Since), and will only load a maximum of
max_count
events, if given. If not given, will read all remaining events.
Implementors
impl<'e, 's, A, E, ES, SS> EventSource<A, E> for CompositeEntitySource<'e, 's, A, E, ES, SS> where
A: Aggregate,
E: AggregateEvent<A>,
ES: EventSource<A, E> + 'e,
SS: SnapshotSource<A> + 's,
[src]
A: Aggregate,
E: AggregateEvent<A>,
ES: EventSource<A, E> + 'e,
SS: SnapshotSource<A> + 's,
type Error = ES::Error
type Events = ES::Events
fn read_events<I>(
&self,
id: &I,
since: Since,
max_count: Option<u64>
) -> Result<Option<Self::Events>, Self::Error> where
I: AggregateId<A>,
[src]
&self,
id: &I,
since: Since,
max_count: Option<u64>
) -> Result<Option<Self::Events>, Self::Error> where
I: AggregateId<A>,
impl<A, E> EventSource<A, E> for NullEventStore<A, E> where
A: Aggregate,
E: AggregateEvent<A>,
[src]
A: Aggregate,
E: AggregateEvent<A>,
type Error = Void
type Events = Empty<VersionedEvent<E>>
fn read_events<I>(
&self,
_id: &I,
_version: Since,
_max_count: Option<u64>
) -> Result<Option<Self::Events>, Self::Error> where
I: AggregateId<A>,
[src]
&self,
_id: &I,
_version: Since,
_max_count: Option<u64>
) -> Result<Option<Self::Events>, Self::Error> where
I: AggregateId<A>,
impl<A, E, M, ES, SS> EventSource<A, E> for CompositeEntityStore<A, E, M, ES, SS> where
A: Aggregate,
E: AggregateEvent<A>,
ES: EntitySource<A, E>,
SS: EntitySink<A, E, M>,
[src]
A: Aggregate,
E: AggregateEvent<A>,
ES: EntitySource<A, E>,
SS: EntitySink<A, E, M>,
type Error = <ES as EventSource<A, E>>::Error
type Events = <ES as EventSource<A, E>>::Events
fn read_events<I>(
&self,
id: &I,
since: Since,
max_count: Option<u64>
) -> Result<Option<Self::Events>, Self::Error> where
I: AggregateId<A>,
[src]
&self,
id: &I,
since: Since,
max_count: Option<u64>
) -> Result<Option<Self::Events>, Self::Error> where
I: AggregateId<A>,
impl<A, E, M, Hasher> EventSource<A, E> for EventStore<A, E, M, Hasher> where
A: Aggregate,
E: AggregateEvent<A> + Clone,
Hasher: BuildHasher,
[src]
A: Aggregate,
E: AggregateEvent<A> + Clone,
Hasher: BuildHasher,