Struct actix::Recipient [−][src]
pub struct Recipient<T: MessageRecipient<M>, M: Message + 'static> { /* fields omitted */ }
Recipient
type allows to send one specific message to an actor.
You can get recipient with Addr<_, _>::recipient()
method.
It is possible to use Clone::clone()
method to get cloned recipient.
Methods
impl<T, M> Recipient<T, M> where
T: MessageRecipient<M>,
M: Message + 'static,
[src]
impl<T, M> Recipient<T, M> where
T: MessageRecipient<M>,
M: Message + 'static,
pub fn new(tx: T::Transport) -> Recipient<T, M>
[src]
pub fn new(tx: T::Transport) -> Recipient<T, M>
Create new recipient
pub fn do_send(&self, msg: M) -> Result<(), T::SendError>
[src]
pub fn do_send(&self, msg: M) -> Result<(), T::SendError>
Send message
Deliver message even if recipient's mailbox is full
pub fn try_send(&self, msg: M) -> Result<(), T::SendError>
[src]
pub fn try_send(&self, msg: M) -> Result<(), T::SendError>
Try send message
This method fails if recipient's mailbox is full or closed. This method register current task in receivers queue.
pub fn send(&self, msg: M) -> T::Request
[src]
pub fn send(&self, msg: M) -> T::Request
Send message and asynchronously wait for response.
Communication channel to the actor is bounded. if returned Request
object get dropped, message cancels.
Trait Implementations
impl<M> Send for Recipient<Syn, M> where
M: Message + Send + 'static,
M::Result: Send,
[src]
impl<M> Send for Recipient<Syn, M> where
M: Message + Send + 'static,
M::Result: Send,
impl<M> Sync for Recipient<Syn, M> where
M: Message + Send + 'static,
M::Result: Send,
[src]
impl<M> Sync for Recipient<Syn, M> where
M: Message + Send + 'static,
M::Result: Send,
impl<T, M> Clone for Recipient<T, M> where
T: MessageRecipient<M>,
M: Message + 'static,
[src]
impl<T, M> Clone for Recipient<T, M> where
T: MessageRecipient<M>,
M: Message + 'static,