actix::dev

Trait ToEnvelope

Source
pub trait ToEnvelope<A, M: Message>
where A: Actor + Handler<M>, A::Context: ToEnvelope<A, M>,
{ // Required method fn pack(msg: M, tx: Option<Sender<M::Result>>) -> Envelope<A>; }
Expand description

Converter trait, packs message into a suitable envelope.

Required Methods§

Source

fn pack(msg: M, tx: Option<Sender<M::Result>>) -> Envelope<A>

Pack message into suitable envelope

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.

Implementors§

Source§

impl<A, M> ToEnvelope<A, M> for Context<A>
where A: Actor<Context = Context<A>> + Handler<M>, M: Message + Send + 'static, M::Result: Send,

Source§

impl<A, M> ToEnvelope<A, M> for SyncContext<A>
where A: Actor<Context = Self> + Handler<M>, M: Message + Send + 'static, M::Result: Send,