Trait cqrs_eventsourcing::Command[][src]

pub trait Command<A, E>: Clone + Sync + Send where
    A: Aggregate,
    E: DomainEvent<A>, 
{ fn id(&self) -> Option<String>;
#[must_use] fn handle<'life0, 'async_trait>(
        self,
        aggregate_context: &'life0 AggregateContext<A>
    ) -> Pin<Box<dyn Future<Output = Result<Vec<E>, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; #[must_use] fn before<'life0, 'async_trait, S: Store<A, E>>(
        command: Self,
        _store: &'life0 S
    ) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>>
    where
        Self: Sized,
        S: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... } }

Command handler

Required methods

fn id(&self) -> Option<String>[src]

#[must_use]fn handle<'life0, 'async_trait>(
    self,
    aggregate_context: &'life0 AggregateContext<A>
) -> Pin<Box<dyn Future<Output = Result<Vec<E>, Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Loading content...

Provided methods

#[must_use]fn before<'life0, 'async_trait, S: Store<A, E>>(
    command: Self,
    _store: &'life0 S
) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>> where
    Self: Sized,
    S: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Loading content...

Implementors

Loading content...