[][src]Trait riker_es::ES

pub trait ES: EntityName + Debug + Send + Sync + 'static {
    type Args: ActorArgs;
    type Model: Model;
    type Cmd: Message;
    type Error: Debug;
    fn new(cx: &Context<CQRS<Self::Cmd>>, args: Self::Args) -> Self;
#[must_use] fn handle_command<'life0, 'async_trait>(
        &'life0 mut self,
        _cmd: Self::Cmd
    ) -> Pin<Box<dyn Future<Output = Result<Commit<Self::Model>, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }

Implement this trait to allow your entity handle external commands

Associated Types

Loading content...

Required methods

fn new(cx: &Context<CQRS<Self::Cmd>>, args: Self::Args) -> Self

#[must_use]fn handle_command<'life0, 'async_trait>(
    &'life0 mut self,
    _cmd: Self::Cmd
) -> Pin<Box<dyn Future<Output = Result<Commit<Self::Model>, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Loading content...

Implementors

Loading content...