1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! Contain support for [`Projection`], an optimized read model
//! of an [`Aggregate`] or of a number of `Aggregate`s.
//!
//! More information about projections can be found here:
//! https://eventstore.com/docs/getting-started/projections/index.html
//!
//! [`Projection`]: trait.Projection.html
//! [`Aggregate`]: ../aggregate/trait.Aggregate.html
use BoxFuture;
use cratePersisted;
/// A `Projection` is an optimized read model (or materialized view)
/// of an [`Aggregate`] model(s), that can be assembled by left-folding
/// its previous state and a number of ordered, consecutive events.
///
/// The events passed to a `Projection` have been persisted onto
/// an [`EventStore`] first.
///
/// [`Aggregate`]: ../aggregate/trait.Aggregate.html
/// [`EventStore`]: ../store/trait.EventStore.html