Trait actix::dev::ToEnvelope
[−]
[src]
pub trait ToEnvelope<A, M> where
A: Actor + Handler<M>,
M: ResponseType + 'static, { fn pack(
msg: M,
tx: Option<SyncSender<Result<M::Item, M::Error>>>
) -> Envelope<A>; }
Converter trait, packs message to suitable envelope
Required Methods
fn pack(
msg: M,
tx: Option<SyncSender<Result<M::Item, M::Error>>>
) -> Envelope<A>
msg: M,
tx: Option<SyncSender<Result<M::Item, M::Error>>>
) -> Envelope<A>
Pack message into envelope
Implementors
impl<A, M> ToEnvelope<A, M> for Context<A> where
A: Actor<Context = Context<A>> + Handler<M>,
M: ResponseType + Send + 'static,
M::Item: Send,
M::Error: Send,impl<A, M> ToEnvelope<A, M> for FramedContext<A> where
M: ResponseType + Send + 'static,
A: FramedActor + Actor<Context = FramedContext<A>> + Handler<M>,
A: StreamHandler<<<A as FramedActor>::Codec as Decoder>::Item, <<A as FramedActor>::Codec as Decoder>::Error>,
<<A as FramedActor>::Codec as Decoder>::Item: ResponseType,
M::Item: Send,
M::Error: Send,impl<A, M> ToEnvelope<A, M> for SyncContext<A> where
A: Actor<Context = SyncContext<A>> + Handler<M>,
M: ResponseType + Send + 'static,
M::Item: Send,
M::Error: Send,