[−][src]Trait actix_broker::BrokerSubscribe
The BrokerSubscribe
trait has functions to register an actor's interest in different
messages.
Provided methods
fn subscribe_async<M: BrokerMsg>(&self, ctx: &mut Self::Context) where
Self: Handler<M>,
Self::Context: ToEnvelope<Self, M>,
Self: Handler<M>,
Self::Context: ToEnvelope<Self, M>,
Asynchronously subscribe to a message.
fn subscribe_sync<M: BrokerMsg>(&self, ctx: &mut Self::Context) where
Self: Handler<M>,
Self::Context: ToEnvelope<Self, M>,
Self: Handler<M>,
Self::Context: ToEnvelope<Self, M>,
Synchronously subscribe to a message. This actor will do nothing else until its interest is registered. If messages of that type have been sent to the broker previously, a copy of the latest message is sent to the calling actor after it has subscribed.
Implementors
impl<A> BrokerSubscribe for A where
A: Actor,
<A as Actor>::Context: AsyncContext<A>,
[src]
A: Actor,
<A as Actor>::Context: AsyncContext<A>,
fn subscribe_async<M: BrokerMsg>(&self, ctx: &mut Self::Context) where
Self: Handler<M>,
Self::Context: ToEnvelope<Self, M>,
[src]
Self: Handler<M>,
Self::Context: ToEnvelope<Self, M>,
fn subscribe_sync<M: BrokerMsg>(&self, ctx: &mut Self::Context) where
Self: Handler<M>,
Self::Context: ToEnvelope<Self, M>,
[src]
Self: Handler<M>,
Self::Context: ToEnvelope<Self, M>,