Struct actix::prelude::Addr
[−]
[src]
pub struct Addr<T: Destination<A>, A> { /* fields omitted */ }
Address of the actor
Methods
impl<T: Destination<A>, A> Addr<T, A>
[src]
fn new(tx: T::Transport) -> Addr<T, A>
[src]
fn connected(&self) -> bool
[src]
Indicates if actor is still alive
fn do_send<M>(&self, msg: M) where
T: MessageDestination<A, M>,
T::Transport: MessageDestinationTransport<T, A, M>,
M: Message + 'static,
A: Handler<M>,
A::Context: ToEnvelope<T, A, M>,
[src]
T: MessageDestination<A, M>,
T::Transport: MessageDestinationTransport<T, A, M>,
M: Message + 'static,
A: Handler<M>,
A::Context: ToEnvelope<T, A, M>,
Sendm message unconditionally
This method ignores actor's mailbox capacity, it silently fails if mailbox is closed.
fn send<M>(&self, msg: M) -> Request<T, A, M> where
T: MessageDestination<A, M>,
T::Transport: MessageDestinationTransport<T, A, M>,
M: Message + 'static,
A: Handler<M>,
A::Context: ToEnvelope<T, A, M>,
[src]
T: MessageDestination<A, M>,
T::Transport: MessageDestinationTransport<T, A, M>,
M: Message + 'static,
A: Handler<M>,
A::Context: ToEnvelope<T, A, M>,
Send asynchronous message and wait for response.
Communication channel to the actor is bounded. if returned Receiver
object get dropped, message cancels.
fn try_send<M>(&self, msg: M) -> Result<(), SendError<M>> where
T: MessageDestination<A, M>,
T::Transport: MessageDestinationTransport<T, A, M>,
M: Message + 'static,
A: Handler<M>,
A::Context: ToEnvelope<T, A, M>,
[src]
T: MessageDestination<A, M>,
T::Transport: MessageDestinationTransport<T, A, M>,
M: Message + 'static,
A: Handler<M>,
A::Context: ToEnvelope<T, A, M>,
Try send message
This method fails if actor's mailbox is full or closed. This method register current task in receivers queue.
fn recipient<M>(self) -> Recipient<T, M> where
T: MessageDestination<A, M> + MessageRecipient<M>,
A: Handler<M>,
A::Context: ToEnvelope<T, A, M>,
<T as Destination<A>>::Transport: MessageDestinationTransport<T, A, M>,
M: Message + 'static,
[src]
T: MessageDestination<A, M> + MessageRecipient<M>,
A: Handler<M>,
A::Context: ToEnvelope<T, A, M>,
<T as Destination<A>>::Transport: MessageDestinationTransport<T, A, M>,
M: Message + 'static,
Get Recipient
for specific message type
Trait Implementations
impl<A, M, B> MessageResponse<A, M> for Addr<Syn, B> where
A: Actor,
M: Message<Result = Addr<Syn, B>>,
B: Actor<Context = Context<B>>,
[src]
A: Actor,
M: Message<Result = Addr<Syn, B>>,
B: Actor<Context = Context<B>>,