pub trait Aggregate: Default {
    // Required methods
    fn apply(&mut self, event: &Event);
    fn aggregate_type<'a>() -> &'a str;

    // Provided methods
    fn aggregate_id<I: Into<String>>(id: I) -> String { ... }
    fn to_id<I: Into<String>>(aggregate_id: I) -> String { ... }
}

Required Methods§

source

fn apply(&mut self, event: &Event)

source

fn aggregate_type<'a>() -> &'a str

Provided Methods§

source

fn aggregate_id<I: Into<String>>(id: I) -> String

source

fn to_id<I: Into<String>>(aggregate_id: I) -> String

Object Safety§

This trait is not object safe.

Implementors§