Struct actix::prelude::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 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>>,
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>
fn clone(&self) -> Addr<A>
[src]
fn clone(&self) -> Addr<A>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<A: Actor> PartialEq for Addr<A>
[src]
impl<A: Actor> PartialEq for Addr<A>
fn eq(&self, other: &Self) -> bool
[src]
fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]This method tests for !=
.
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>