Trait akka_persistence_rs::entity_manager::Handler
source · pub trait Handler<E> {
// Required method
fn process<'life0, 'async_trait>(
&'life0 mut self,
envelope: EventEnvelope<E>
) -> Pin<Box<dyn Future<Output = Result<EventEnvelope<E>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Handles events, in form of event envelopes, to another type of envelope e.g. those that can be persisted using a storage technology.
Required Methods§
sourcefn process<'life0, 'async_trait>(
&'life0 mut self,
envelope: EventEnvelope<E>
) -> Pin<Box<dyn Future<Output = Result<EventEnvelope<E>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn process<'life0, 'async_trait>( &'life0 mut self, envelope: EventEnvelope<E> ) -> Pin<Box<dyn Future<Output = Result<EventEnvelope<E>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Consume an envelope, performing some processing e.g. persisting an envelope, and then returning the same envelope if all went well.