pub struct Broker<T> { /* private fields */ }Implementations§
Source§impl Broker<SystemBroker>
The system service actor that keeps track of subscriptions and routes messages to them.
impl Broker<SystemBroker>
The system service actor that keeps track of subscriptions and routes messages to them.
Sourcepub fn issue_async<M: BrokerMsg>(msg: M)
pub fn issue_async<M: BrokerMsg>(msg: M)
Send messages asynchronously via the broker. It can be called from with
actors with a SyncContext, or where you don’t have access to self. e.g. From within
a HttpHandler from actix-web.
Source§impl Broker<ArbiterBroker>
The system service actor that keeps track of subscriptions and routes messages to them.
impl Broker<ArbiterBroker>
The system service actor that keeps track of subscriptions and routes messages to them.
Sourcepub fn issue_async<M: BrokerMsg>(msg: M)
pub fn issue_async<M: BrokerMsg>(msg: M)
Send messages asynchronously via the broker. It can be called from with
actors with a SyncContext, or where you don’t have access to self. e.g. From within
a HttpHandler from actix-web.
Trait Implementations§
Source§impl<T: 'static + Unpin> Actor for Broker<T>
impl<T: 'static + Unpin> Actor for Broker<T>
Source§fn started(&mut self, ctx: &mut Self::Context)
fn started(&mut self, ctx: &mut Self::Context)
Called when an actor gets polled the first time.
Source§fn stopping(&mut self, ctx: &mut Self::Context) -> Running
fn stopping(&mut self, ctx: &mut Self::Context) -> Running
Called after an actor is in
Actor::Stopping state. Read moreSource§fn start_default() -> Addr<Self>
fn start_default() -> Addr<Self>
Construct and start a new asynchronous actor, returning its
address. Read more
Source§fn start_in_arbiter<F>(wrk: &ArbiterHandle, f: F) -> Addr<Self>
fn start_in_arbiter<F>(wrk: &ArbiterHandle, f: F) -> Addr<Self>
Start new actor in arbiter’s thread.
Source§impl ArbiterService for Broker<ArbiterBroker>
impl ArbiterService for Broker<ArbiterBroker>
Source§fn start_service() -> Addr<Self>
fn start_service() -> Addr<Self>
Construct and start arbiter service
Source§fn service_started(&mut self, ctx: &mut Context<Self>)
fn service_started(&mut self, ctx: &mut Context<Self>)
Method is called during service initialization.
Source§fn from_registry() -> Addr<Self>
fn from_registry() -> Addr<Self>
Get actor’s address from arbiter registry
Source§impl Supervised for Broker<ArbiterBroker>
impl Supervised for Broker<ArbiterBroker>
Source§fn restarting(&mut self, ctx: &mut Self::Context)
fn restarting(&mut self, ctx: &mut Self::Context)
Called when the supervisor restarts a failed actor.
Source§impl Supervised for Broker<SystemBroker>
impl Supervised for Broker<SystemBroker>
Source§fn restarting(&mut self, ctx: &mut Self::Context)
fn restarting(&mut self, ctx: &mut Self::Context)
Called when the supervisor restarts a failed actor.
Source§impl SystemService for Broker<SystemBroker>
impl SystemService for Broker<SystemBroker>
Source§fn start_service(wrk: &ArbiterHandle) -> Addr<Self>
fn start_service(wrk: &ArbiterHandle) -> Addr<Self>
Construct and start system service
Source§fn service_started(&mut self, ctx: &mut Context<Self>)
fn service_started(&mut self, ctx: &mut Context<Self>)
Method is called during service initialization.
Source§fn from_registry() -> Addr<Self>
fn from_registry() -> Addr<Self>
Get actor’s address from system registry
Auto Trait Implementations§
impl<T> Freeze for Broker<T>
impl<T> !RefUnwindSafe for Broker<T>
impl<T> !Send for Broker<T>
impl<T> !Sync for Broker<T>
impl<T> Unpin for Broker<T>where
T: Unpin,
impl<T> !UnwindSafe for Broker<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more