Trait actix::prelude::actix::Subscriber
[−]
[src]
pub trait Subscriber<M: 'static> { fn send(&self, msg: M) -> Result<(), M>; }
Subscriber trait describes ability of actor to receive one specific message
You can get subscriber with Address::subscriber()
or
SyncAddress::subscriber()
methods. Both methods returns boxed trait object.
It is possible to use Clone::clone()
method to get cloned subscriber.
Required Methods
Implementors
impl<A, M> Subscriber<M> for Address<A> where
A: Actor + Handler<M>,
A::Context: AsyncContext<A>,
M: ResponseType + 'static,impl<A, M> Subscriber<M> for SyncAddress<A> where
A: Actor + Handler<M>,
<A as Actor>::Context: ToEnvelope<A>,
M: ResponseType + Send + 'static,
M::Item: Send,
M::Error: Send,