Trait actix::dev::MessageDestination
[−]
[src]
pub trait MessageDestination<A, M>: Destination<A> where
A: Handler<M>,
A::Context: ToEnvelope<Self, A, M>,
M: Message + 'static,
Self::Transport: MessageDestinationTransport<Self, A, M>, { type Envelope; type ResultSender; type ResultReceiver: Future<Item = M::Result>; fn do_send(tx: &Self::Transport, msg: M); fn try_send(tx: &Self::Transport, msg: M) -> Result<(), SendError<M>>; fn send(tx: &Self::Transport, msg: M) -> Request<Self, A, M>; fn recipient(tx: Self::Transport) -> Recipient<Self, M>
where
Self: MessageRecipient<M>; }
Associated Types
Required Methods
fn do_send(tx: &Self::Transport, msg: M)
Send message unconditionally
fn try_send(tx: &Self::Transport, msg: M) -> Result<(), SendError<M>>
Try send message
fn send(tx: &Self::Transport, msg: M) -> Request<Self, A, M>
Send asynchronous message and wait for response.
fn recipient(tx: Self::Transport) -> Recipient<Self, M> where
Self: MessageRecipient<M>,
Self: MessageRecipient<M>,
Get recipient for specific message type.
Implementors
impl<A: Actor, M> MessageDestination<A, M> for Syn where
A: Handler<M>,
A::Context: ToEnvelope<Self, A, M>,
M: Message + Send + 'static,
M::Result: Send, type Envelope = SyncEnvelope<A>; type ResultSender = Sender<M::Result>; type ResultReceiver = Receiver<M::Result>;impl<A, M> MessageDestination<A, M> for Unsync where
M: Message + 'static,
A: Handler<M>,
A::Context: AsyncContext<A> + ToEnvelope<Self, A, M>, type Envelope = UnsyncEnvelope<A>; type ResultSender = Sender<M::Result>; type ResultReceiver = Receiver<M::Result>;