Trait actix_web::actix::actix::dev::ToEnvelope [−]
pub trait ToEnvelope<A, M> where
A: Actor + Handler<M>,
M: Message,
<A as Actor>::Context: ToEnvelope<A, M>, { fn pack(msg: M, tx: Option<Sender<<M as Message>::Result>>) -> Envelope<A>; }
Converter trait, packs message to suitable envelope
Required Methods
fn pack(msg: M, tx: Option<Sender<<M as Message>::Result>>) -> Envelope<A>
Pack message into suitable envelope
Implementors
impl<A, M, S> ToEnvelope<A, M> for HttpContext<A, S> where
A: Actor<Context = HttpContext<A, S>> + Handler<M>,
M: Message + Send + 'static,
M::Result: Send,impl<A, M> ToEnvelope<A, M> for SyncContext<A> where
A: Actor<Context = SyncContext<A>> + Handler<M>,
M: Message + Send + 'static,
<M as Message>::Result: Send,impl<A, M> ToEnvelope<A, M> for Context<A> where
A: Actor<Context = Context<A>> + Handler<M>,
M: Message + Send + 'static,
<M as Message>::Result: Send,impl<A, M, S> ToEnvelope<A, M> for WebsocketContext<A, S> where
A: Actor<Context = WebsocketContext<A, S>> + Handler<M>,
M: ActixMessage + Send + 'static,
M::Result: Send,