[][src]Trait actix_broker::BrokerSubscribe

pub trait BrokerSubscribe where
    Self: Actor,
    Self::Context: AsyncContext<Self>, 
{ fn subscribe_async<M: BrokerMsg>(&self, ctx: &mut Self::Context)
    where
        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>
, { ... } }

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>, 

Asynchronously subscribe to a message.

fn subscribe_sync<M: BrokerMsg>(&self, ctx: &mut Self::Context) where
    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.

Loading content...

Implementors

impl<A> BrokerSubscribe for A where
    A: Actor,
    <A as Actor>::Context: AsyncContext<A>, 
[src]

fn subscribe_async<M: BrokerMsg>(&self, ctx: &mut Self::Context) where
    Self: Handler<M>,
    Self::Context: ToEnvelope<Self, M>, 
[src]

fn subscribe_sync<M: BrokerMsg>(&self, ctx: &mut Self::Context) where
    Self: Handler<M>,
    Self::Context: ToEnvelope<Self, M>, 
[src]

Loading content...