[][src]Struct actix::Recipient

pub struct Recipient<M: Message> where
    M: Message + Send,
    M::Result: Send
{ /* fields omitted */ }

The Recipient type allows to send one specific message to an actor.

You can get a recipient using the Addr::recipient() method. It is possible to use the Clone::clone() method to get a cloned recipient.

Methods

impl<M> Recipient<M> where
    M: Message + Send,
    M::Result: Send
[src]

pub fn do_send(&self, msg: M) -> Result<(), SendError<M>>[src]

Sends a message.

Deliver the message even if the recipient's mailbox is full.

pub fn try_send(&self, msg: M) -> Result<(), SendError<M>>[src]

Attempts to send a message.

This method fails if the actor's mailbox is full or closed. This method registers the current task in the receivers queue.

Important traits for RecipientRequest<M>
pub fn send(&self, msg: M) -> RecipientRequest<M>[src]

Sends a message and asynchronously wait for a response.

The communication channel to the actor is bounded. If the returned Request object gets dropped, the message is cancelled.

pub fn connected(&self) -> bool[src]

Trait Implementations

impl<M> Clone for Recipient<M> where
    M: Message + Send,
    M::Result: Send
[src]

impl<M> Debug for Recipient<M> where
    M: Message + Send,
    M::Result: Send
[src]

impl<M> Eq for Recipient<M> where
    M: Message + Send,
    M::Result: Send
[src]

impl<M> Hash for Recipient<M> where
    M: Message + Send,
    M::Result: Send
[src]

impl<A: Actor, M: Message + Send + 'static> Into<Recipient<M>> for Addr<A> where
    A: Handler<M>,
    M::Result: Send,
    A::Context: ToEnvelope<A, M>, 
[src]

impl<M> PartialEq<Recipient<M>> for Recipient<M> where
    M: Message + Send,
    M::Result: Send
[src]

Auto Trait Implementations

impl<M> !RefUnwindSafe for Recipient<M>

impl<M> Send for Recipient<M>

impl<M> !Sync for Recipient<M>

impl<M> Unpin for Recipient<M>

impl<M> !UnwindSafe for Recipient<M>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,