[][src]Trait eventually::AggregateExt

pub trait AggregateExt: Aggregate {
    fn fold<I>(
        state: Self::State,
        events: I
    ) -> Result<Self::State, Self::Error>
    where
        I: Iterator<Item = Self::Event>
, { ... } }

Extension trait with some handy methods to use with Aggregates.

Provided methods

fn fold<I>(state: Self::State, events: I) -> Result<Self::State, Self::Error> where
    I: Iterator<Item = Self::Event>, 

Applies a list of Events from an Iterator to the current Aggregate State.

Useful to recreate the State of an Aggregate when the Events are located in-memory.

Loading content...

Implementors

impl<T> AggregateExt for T where
    T: Aggregate
[src]

Loading content...