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