BrokerIssue

Trait BrokerIssue 

Source
pub trait BrokerIssue
where Self: Actor, <Self as Actor>::Context: AsyncContext<Self>,
{ // Provided methods 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§

Source

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.

Source

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.

Source

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);

Source

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);

Source

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);

Source

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);

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<A> BrokerIssue for A
where A: Actor, <A as Actor>::Context: AsyncContext<A>,