Struct actix::Addr [−][src]
pub struct Addr<A: Actor> { /* fields omitted */ }
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 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>>,
fn handle<R: ResponseChannel<M>>(self, _: &mut A::Context, tx: Option<R>)
[src]
fn handle<R: ResponseChannel<M>>(self, _: &mut A::Context, tx: Option<R>)
impl<A: Actor> Clone for Addr<A>
[src]
impl<A: Actor> Clone for Addr<A>