pub struct AddrResolver { /* private fields */ }Implementations§
Source§impl AddrResolver
A system actor that can resolve ACTOR_IDs to actix::Addrs
by sending an AddrRequest.
impl AddrResolver
A system actor that can resolve ACTOR_IDs to actix::Addrs
by sending an AddrRequest.
pub fn new() -> Self
pub fn resolve_str( &mut self, id: String, ) -> Result<&Recipient<RemoteWrapper>, NotAvailableError>
pub fn resolve_rec( &mut self, rec: &Recipient<RemoteWrapper>, ) -> Result<&String, NotAvailableError>
pub fn resolve_rec_from_addr_representation( &mut self, addr_representation: AddrRepresentation, ) -> Result<&Recipient<RemoteWrapper>, NotAvailableError>
Trait Implementations§
Source§impl Actor for AddrResolver
impl Actor for AddrResolver
Source§type Context = Context<AddrResolver>
type Context = Context<AddrResolver>
Actor execution context type
Source§fn started(&mut self, _ctx: &mut Context<Self>)
fn started(&mut self, _ctx: &mut Context<Self>)
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 Default for AddrResolver
impl Default for AddrResolver
Source§fn default() -> AddrResolver
fn default() -> AddrResolver
Returns the “default value” for a type. Read more
Source§impl Handler<AddrRequest> for AddrResolver
impl Handler<AddrRequest> for AddrResolver
Source§impl Handler<RemoteWrapper> for AddrResolver
impl Handler<RemoteWrapper> for AddrResolver
Source§impl Supervised for AddrResolver
impl Supervised for AddrResolver
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 AddrResolver
impl SystemService for AddrResolver
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 Freeze for AddrResolver
impl !RefUnwindSafe for AddrResolver
impl Send for AddrResolver
impl Sync for AddrResolver
impl Unpin for AddrResolver
impl UnsafeUnpin for AddrResolver
impl !UnwindSafe for AddrResolver
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
Source§impl<A> BrokerIssue for A
impl<A> BrokerIssue for A
Source§fn issue_async<T, M>(&self, msg: M)where
T: RegisteredBroker,
M: BrokerMsg,
fn issue_async<T, M>(&self, msg: M)where
T: RegisteredBroker,
M: BrokerMsg,
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, M>(&self, msg: M, ctx: &mut Self::Context)where
T: RegisteredBroker,
M: BrokerMsg,
fn issue_sync<T, M>(&self, msg: M, ctx: &mut Self::Context)where
T: RegisteredBroker,
M: BrokerMsg,
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>(&self, msg: M)where
M: BrokerMsg,
fn issue_system_async<M>(&self, msg: M)where
M: BrokerMsg,
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>(&self, msg: M, ctx: &mut Self::Context)where
M: BrokerMsg,
fn issue_system_sync<M>(&self, msg: M, ctx: &mut Self::Context)where
M: BrokerMsg,
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>(&self, msg: M)where
M: BrokerMsg,
fn issue_arbiter_async<M>(&self, msg: M)where
M: BrokerMsg,
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>(&self, msg: M, ctx: &mut Self::Context)where
M: BrokerMsg,
fn issue_arbiter_sync<M>(&self, msg: M, ctx: &mut Self::Context)where
M: BrokerMsg,
Helper to synchronously issue to an arbiter-specific broker
This is the equivalent of
self.issue_sync::<ArbiterBroker, M>(ctx);Source§impl<A> BrokerSubscribe for A
impl<A> BrokerSubscribe for A
Source§fn subscribe_async<T, M>(&self, ctx: &mut Self::Context)
fn subscribe_async<T, M>(&self, ctx: &mut Self::Context)
Asynchronously subscribe to a message.
Source§fn subscribe_sync<T, M>(&self, ctx: &mut Self::Context)
fn subscribe_sync<T, M>(&self, ctx: &mut Self::Context)
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.
Source§fn subscribe_system_async<M>(&self, ctx: &mut Self::Context)
fn subscribe_system_async<M>(&self, ctx: &mut Self::Context)
Helper to asynchronously subscribe to a system broker
This is the equivalent of
self.subscribe_async::<SystemBroker, M>(ctx);Source§fn subscribe_system_sync<M>(&self, ctx: &mut Self::Context)
fn subscribe_system_sync<M>(&self, ctx: &mut Self::Context)
Helper to synchronously subscribe to a system broker
This is the equivalent of `self.subscribe_sync::<SystemBroker, M>(ctx);
Source§fn subscribe_arbiter_async<M>(&self, ctx: &mut Self::Context)
fn subscribe_arbiter_async<M>(&self, ctx: &mut Self::Context)
Helper to asynchronously subscribe to an arbiter-specific broker
This is the equivalent of
self.subscribe_async::<ArbiterBroker, M>(ctx);Source§fn subscribe_arbiter_sync<M>(&self, ctx: &mut Self::Context)
fn subscribe_arbiter_sync<M>(&self, ctx: &mut Self::Context)
Helper to synchronously subscribe to an arbiter-specific broker
This is the equivalent of `self.subscribe_sync::<ArbiterBroker, M>(ctx);