EventSourcedEntity

Trait EventSourcedEntity 

Source
pub trait EventSourcedEntity:
    Send
    + Sync
    + Debug
    + 'static{
    type Command;
    type Event;
    type PersistenceId;

    // Required methods
    fn persistence_id(&self) -> Self::PersistenceId;
    fn handle_command(&self, command: Self::Command) -> Result<Vec<Self::Event>>;
    fn apply_event(&mut self, event: Self::Event);
}

Required Associated Types§

Required Methods§

Source

fn persistence_id(&self) -> Self::PersistenceId

Source

fn handle_command(&self, command: Self::Command) -> Result<Vec<Self::Event>>

Source

fn apply_event(&mut self, event: Self::Event)

Implementors§