Trait actix_broker::BrokerSubscribe[][src]

pub trait BrokerSubscribe: Actor<Context = Context<Self>> {
    fn subscribe_async<M: BrokerMsg>(&self, ctx: &mut Self::Context)
    where
        <M as Message>::Result: Send,
        Self: Handler<M>
, { ... }
fn subscribe_sync<M: BrokerMsg>(&self, ctx: &mut Self::Context)
    where
        <M as Message>::Result: Send,
        Self: Handler<M>
, { ... } }

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.

Implementors