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

Asynchronously subscribe to a message.

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.

Helper to asynchronously subscribe to a system broker This is the equivalent of self.subscribe_async::<SystemBroker, M>(ctx);

Helper to synchronously subscribe to a system broker This is the equivalent of `self.subscribe_sync::<SystemBroker, M>(ctx);

Helper to asynchronously subscribe to an arbiter-specific broker This is the equivalent of self.subscribe_async::<ArbiterBroker, M>(ctx);

Helper to synchronously subscribe to an arbiter-specific broker This is the equivalent of `self.subscribe_sync::<ArbiterBroker, M>(ctx);

Implementors