Trait actix_broker::BrokerSubscribe [−][src]
pub trait BrokerSubscribe where
Self: Actor,
<Self as Actor>::Context: AsyncContext<Self>, { fn subscribe_async<T: RegisteredBroker, M: BrokerMsg>(
&self,
ctx: &mut Self::Context
)
where
Self: Handler<M>,
<Self as Actor>::Context: ToEnvelope<Self, M>, { ... } fn subscribe_sync<T: RegisteredBroker, M: BrokerMsg>(
&self,
ctx: &mut Self::Context
)
where
Self: Handler<M>,
<Self as Actor>::Context: ToEnvelope<Self, M>, { ... } fn subscribe_system_async<M: BrokerMsg>(&self, ctx: &mut Self::Context)
where
Self: Handler<M>,
<Self as Actor>::Context: ToEnvelope<Self, M>, { ... } fn subscribe_system_sync<M: BrokerMsg>(&self, ctx: &mut Self::Context)
where
Self: Handler<M>,
<Self as Actor>::Context: ToEnvelope<Self, M>, { ... } fn subscribe_arbiter_async<M: BrokerMsg>(&self, ctx: &mut Self::Context)
where
Self: Handler<M>,
<Self as Actor>::Context: ToEnvelope<Self, M>, { ... } fn subscribe_arbiter_sync<M: BrokerMsg>(&self, ctx: &mut Self::Context)
where
Self: Handler<M>,
<Self as Actor>::Context: ToEnvelope<Self, M>, { ... } }
Expand description
The BrokerSubscribe
trait has functions to register an actor’s interest in different
messages.
Provided methods
fn subscribe_async<T: RegisteredBroker, M: BrokerMsg>(
&self,
ctx: &mut Self::Context
) where
Self: Handler<M>,
<Self as Actor>::Context: ToEnvelope<Self, M>,
[src]
fn subscribe_async<T: RegisteredBroker, M: BrokerMsg>(
&self,
ctx: &mut Self::Context
) where
Self: Handler<M>,
<Self as Actor>::Context: ToEnvelope<Self, M>,
[src]Asynchronously subscribe to a message.
fn subscribe_sync<T: RegisteredBroker, M: BrokerMsg>(
&self,
ctx: &mut Self::Context
) where
Self: Handler<M>,
<Self as Actor>::Context: ToEnvelope<Self, M>,
[src]
fn subscribe_sync<T: RegisteredBroker, M: BrokerMsg>(
&self,
ctx: &mut Self::Context
) where
Self: Handler<M>,
<Self as Actor>::Context: ToEnvelope<Self, M>,
[src]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.
fn subscribe_system_async<M: BrokerMsg>(&self, ctx: &mut Self::Context) where
Self: Handler<M>,
<Self as Actor>::Context: ToEnvelope<Self, M>,
[src]
fn subscribe_system_async<M: BrokerMsg>(&self, ctx: &mut Self::Context) where
Self: Handler<M>,
<Self as Actor>::Context: ToEnvelope<Self, M>,
[src]Helper to asynchronously subscribe to a system broker
This is the equivalent of self.subscribe_async::<SystemBroker, M>(ctx);
fn subscribe_system_sync<M: BrokerMsg>(&self, ctx: &mut Self::Context) where
Self: Handler<M>,
<Self as Actor>::Context: ToEnvelope<Self, M>,
[src]
fn subscribe_system_sync<M: BrokerMsg>(&self, ctx: &mut Self::Context) where
Self: Handler<M>,
<Self as Actor>::Context: ToEnvelope<Self, M>,
[src]Helper to synchronously subscribe to a system broker This is the equivalent of `self.subscribe_sync::<SystemBroker, M>(ctx);
fn subscribe_arbiter_async<M: BrokerMsg>(&self, ctx: &mut Self::Context) where
Self: Handler<M>,
<Self as Actor>::Context: ToEnvelope<Self, M>,
[src]
fn subscribe_arbiter_async<M: BrokerMsg>(&self, ctx: &mut Self::Context) where
Self: Handler<M>,
<Self as Actor>::Context: ToEnvelope<Self, M>,
[src]Helper to asynchronously subscribe to an arbiter-specific broker
This is the equivalent of self.subscribe_async::<ArbiterBroker, M>(ctx);
fn subscribe_arbiter_sync<M: BrokerMsg>(&self, ctx: &mut Self::Context) where
Self: Handler<M>,
<Self as Actor>::Context: ToEnvelope<Self, M>,
[src]
fn subscribe_arbiter_sync<M: BrokerMsg>(&self, ctx: &mut Self::Context) where
Self: Handler<M>,
<Self as Actor>::Context: ToEnvelope<Self, M>,
[src]Helper to synchronously subscribe to an arbiter-specific broker This is the equivalent of `self.subscribe_sync::<ArbiterBroker, M>(ctx);