Trait akka_projection_rs::PendingHandler
source · pub trait PendingHandler {
type Envelope: Send;
const MAX_PENDING: usize;
// Required method
fn process_pending<'life0, 'async_trait>(
&'life0 mut self,
envelope: Self::Envelope
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Future<Output = Result<(), HandlerError>> + Send>>, 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 Associated Constants§
sourceconst MAX_PENDING: usize
const MAX_PENDING: usize
The maximum number of envelopes that can be pending at any time.
Required Methods§
sourcefn process_pending<'life0, 'async_trait>(
&'life0 mut self,
envelope: Self::Envelope
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Future<Output = Result<(), HandlerError>> + Send>>, HandlerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn process_pending<'life0, 'async_trait>( &'life0 mut self, envelope: Self::Envelope ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Future<Output = Result<(), HandlerError>> + Send>>, HandlerError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Process an envelope with a pending result. A handler’s result is “pending” when envelopes can be passed through and the result of processing one is not immediately known. Meanwhile, more envelopes can be passed though.