pub trait DeferableReplyHandler<M>: Actor {
type Reply: Send + 'static;
// Required method
fn handle_message<'life0, 'life1, 'async_trait>(
&'life0 mut self,
message: M,
reply: impl 'async_trait + FnOnce(Self::Reply) + Send + Sync + 'static,
ctx: &'life1 ActorContext<Self>,
) -> Pin<Box<dyn Future<Output = Result<(), ActorExitStatus>> + Send + 'async_trait>>
where M: Send + Sync + 'static,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Message handler that allows actor to defer the reply
Required Associated Types§
Required Methods§
fn handle_message<'life0, 'life1, 'async_trait>( &'life0 mut self, message: M, reply: impl 'async_trait + FnOnce(Self::Reply) + Send + Sync + 'static, ctx: &'life1 ActorContext<Self>, ) -> Pin<Box<dyn Future<Output = Result<(), ActorExitStatus>> + Send + 'async_trait>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.