[−][src]Struct teatree::actor::prelude::Addr
The address of an actor.
Methods
impl<A> Addr<A> where
A: Actor,
[src]
A: Actor,
pub fn new(tx: AddressSender<A>) -> Addr<A>
[src]
pub fn connected(&self) -> bool
[src]
Returns whether the actor is still alive.
pub fn do_send<M>(&self, msg: M) where
A: Handler<M>,
M: Message + Send,
<M as Message>::Result: Send,
<A as Actor>::Context: ToEnvelope<A, M>,
[src]
A: Handler<M>,
M: Message + Send,
<M as Message>::Result: Send,
<A as Actor>::Context: ToEnvelope<A, M>,
Sends a message unconditionally, ignoring any potential errors.
The message is always queued, even if the mailbox for the receiver is full. If the mailbox is closed, the message is silently dropped.
pub fn try_send<M>(&self, msg: M) -> Result<(), SendError<M>> where
A: Handler<M>,
M: Message + Send + 'static,
<M as Message>::Result: Send,
<A as Actor>::Context: ToEnvelope<A, M>,
[src]
A: Handler<M>,
M: Message + Send + 'static,
<M as Message>::Result: Send,
<A as Actor>::Context: ToEnvelope<A, M>,
Tries to send a message.
This method fails if actor's mailbox is full or closed. This method registers the current task in the receiver's queue.
pub fn send<M>(&self, msg: M) -> Request<A, M> where
A: Handler<M>,
M: Message + Send,
<M as Message>::Result: Send,
<A as Actor>::Context: ToEnvelope<A, M>,
[src]
A: Handler<M>,
M: Message + Send,
<M as Message>::Result: Send,
<A as Actor>::Context: ToEnvelope<A, M>,
Sends an asynchronous message and waits for a response.
The communication channel to the actor is bounded. If the
returned Future
object gets dropped, the message is
cancelled.
pub fn recipient<M>(self) -> Recipient<M> where
A: Handler<M>,
M: 'static + Message + Send,
<A as Actor>::Context: ToEnvelope<A, M>,
<M as Message>::Result: Send,
[src]
A: Handler<M>,
M: 'static + Message + Send,
<A as Actor>::Context: ToEnvelope<A, M>,
<M as Message>::Result: Send,
Returns the Recipient
for a specific message type.
pub fn downgrade(&self) -> WeakAddr<A>
[src]
Returns a downgraded WeakAddr
.
Trait Implementations
impl<A> Clone for Addr<A> where
A: Actor,
[src]
A: Actor,
fn clone(&self) -> Addr<A>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<A> PartialEq<Addr<A>> for Addr<A> where
A: Actor,
[src]
A: Actor,
fn eq(&self, other: &Addr<A>) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<A> Debug for Addr<A> where
A: Actor + Debug,
[src]
A: Actor + Debug,
impl<A> Hash for Addr<A> where
A: Actor,
[src]
A: Actor,
fn hash<H>(&self, state: &mut H) where
H: Hasher,
[src]
H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<A> Eq for Addr<A> where
A: Actor,
[src]
A: Actor,
impl<A, M, B> MessageResponse<A, M> for Addr<B> where
A: Actor,
B: Actor<Context = Context<B>>,
M: Message<Result = Addr<B>>,
[src]
A: Actor,
B: Actor<Context = Context<B>>,
M: Message<Result = Addr<B>>,
impl<A, M> Into<Recipient<M>> for Addr<A> where
A: Actor + Handler<M>,
M: 'static + Message + Send,
<M as Message>::Result: Send,
<A as Actor>::Context: ToEnvelope<A, M>,
[src]
A: Actor + Handler<M>,
M: 'static + Message + Send,
<M as Message>::Result: Send,
<A as Actor>::Context: ToEnvelope<A, M>,
Auto Trait Implementations
Blanket Implementations
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> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for 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<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
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> Same<T> for T
type Output = T
Should always be Self