Trait akka_projection_rs::Handler
source · pub trait Handler {
type Envelope: Send;
// Required method
fn process<'life0, 'async_trait>(
&'life0 mut self,
_envelope: Self::Envelope
) -> Pin<Box<dyn Future<Output = Result<(), HandlerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Handle event envelopes in any way that an application requires.
Required Associated Types§
Required Methods§
sourcefn process<'life0, 'async_trait>(
&'life0 mut self,
_envelope: Self::Envelope
) -> Pin<Box<dyn Future<Output = Result<(), HandlerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn process<'life0, 'async_trait>( &'life0 mut self, _envelope: Self::Envelope ) -> Pin<Box<dyn Future<Output = Result<(), HandlerError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Process an envelope. A handler’s result is “completed” where envelopes are processed upon the previous one having been processed successfully.