Trait actix_broker::BrokerIssue
source · [−]pub trait BrokerIssue where
Self: Actor,
<Self as Actor>::Context: AsyncContext<Self>, {
fn issue_async<T: RegisteredBroker, M: BrokerMsg>(&self, msg: M) { ... }
fn issue_sync<T: RegisteredBroker, M: BrokerMsg>(
&self,
msg: M,
ctx: &mut Self::Context
) { ... }
fn issue_system_async<M: BrokerMsg>(&self, msg: M) { ... }
fn issue_system_sync<M: BrokerMsg>(&self, msg: M, ctx: &mut Self::Context) { ... }
fn issue_arbiter_async<M: BrokerMsg>(&self, msg: M) { ... }
fn issue_arbiter_sync<M: BrokerMsg>(&self, msg: M, ctx: &mut Self::Context) { ... }
}
Expand description
The BrokerIssue
provides functions to issue messages to subscribers.
This will not deliver the message to the actor that sent it.
Provided Methods
fn issue_async<T: RegisteredBroker, M: BrokerMsg>(&self, msg: M)
fn issue_async<T: RegisteredBroker, M: BrokerMsg>(&self, msg: M)
Asynchronously issue a message. This bypasses the mailbox capacity, and will always queue the message. If the mailbox is closed, the message is silently dropped and the subscriber is detached from the broker.
fn issue_sync<T: RegisteredBroker, M: BrokerMsg>(
&self,
msg: M,
ctx: &mut Self::Context
)
fn issue_sync<T: RegisteredBroker, M: BrokerMsg>(
&self,
msg: M,
ctx: &mut Self::Context
)
Synchronously issue a message. This also causes the broker to synchronously forward those messages on to any subscribers before handling any other messages.
fn issue_system_async<M: BrokerMsg>(&self, msg: M)
fn issue_system_async<M: BrokerMsg>(&self, msg: M)
Helper to asynchronously issue to an system broker
This is the equivalent of self.issue_async::<SystemBroker, M>(ctx);
fn issue_system_sync<M: BrokerMsg>(&self, msg: M, ctx: &mut Self::Context)
fn issue_system_sync<M: BrokerMsg>(&self, msg: M, ctx: &mut Self::Context)
Helper to synchronously issue to an system broker
This is the equivalent of self.issue_sync::<SystemBroker, M>(ctx);
fn issue_arbiter_async<M: BrokerMsg>(&self, msg: M)
fn issue_arbiter_async<M: BrokerMsg>(&self, msg: M)
Helper to asynchronously issue to an arbiter-specific broker
This is the equivalent of self.issue_async::<ArbiterBroker, M>(ctx);
fn issue_arbiter_sync<M: BrokerMsg>(&self, msg: M, ctx: &mut Self::Context)
fn issue_arbiter_sync<M: BrokerMsg>(&self, msg: M, ctx: &mut Self::Context)
Helper to synchronously issue to an arbiter-specific broker
This is the equivalent of self.issue_sync::<ArbiterBroker, M>(ctx);