[−][src]Struct actix::Recipient
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]
M: Message + Send,
M::Result: Send,
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]
M: Message + Send,
M::Result: Send,
impl<M> Debug for Recipient<M> where
M: Message + Send,
M::Result: Send,
[src]
M: Message + Send,
M::Result: Send,
impl<M> Eq for Recipient<M> where
M: Message + Send,
M::Result: Send,
[src]
M: Message + Send,
M::Result: Send,
impl<M> Hash for Recipient<M> where
M: Message + Send,
M::Result: Send,
[src]
M: Message + Send,
M::Result: Send,
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
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]
A: Handler<M>,
M::Result: Send,
A::Context: ToEnvelope<A, M>,
impl<M> PartialEq<Recipient<M>> for Recipient<M> where
M: Message + Send,
M::Result: Send,
[src]
M: Message + Send,
M::Result: Send,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
ⓘImportant traits for &'_ mut Ffn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,