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