Skip to main content

aggregator

Function aggregator 

Source
pub fn aggregator(id: impl Into<String>) -> AggregatorBuilder
Expand description

Creates a builder for an existing aggregate.

§Example

aggregator(&existing_id)
    .original_version(current_version)
    .event(&MoneyDeposited { amount: 100 })
    .commit(&executor)
    .await?;