pub enum Connector {
Gossip(Gossip),
SingleSeed(SingleSeed),
}Variants§
Gossip(Gossip)
SingleSeed(SingleSeed)
Implementations§
Source§impl Connector
impl Connector
pub fn from_connection_protocol( connection_protocol: ConnectionProtocol, own_address: SocketAddr, seed_nodes: Vec<SocketAddr>, ) -> Self
pub fn start_service_from( connection_protocol: ConnectionProtocol, own_address: SocketAddr, seed_nodes: Vec<SocketAddr>, )
Trait Implementations§
Source§impl Actor for Connector
impl Actor for Connector
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 CustomSystemService for Connector
impl CustomSystemService for Connector
fn custom_service_started(&mut self, _ctx: &mut Context<Self>)
Source§fn start_service_with(
f: impl Fn() -> Self + Sync + 'static + Send,
) -> Addr<Self>
fn start_service_with( f: impl Fn() -> Self + Sync + 'static + Send, ) -> Addr<Self>
Construct and start system service with arguments
fn add_to_registry(addr: Addr<Self>) -> Addr<Self>
Source§fn from_custom_registry() -> Addr<Self>
fn from_custom_registry() -> Addr<Self>
Get actor’s address from system registry
Source§impl Handler<NodeResolving> for Connector
impl Handler<NodeResolving> for Connector
Source§impl Handler<RemoteWrapper> for Connector
impl Handler<RemoteWrapper> for Connector
Source§impl RemoteActor for Connector
impl RemoteActor for Connector
Source§impl Supervised for Connector
impl Supervised for Connector
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 Connector
impl SystemService for Connector
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 Connector
impl !RefUnwindSafe for Connector
impl Send for Connector
impl Sync for Connector
impl Unpin for Connector
impl UnsafeUnpin for Connector
impl !UnwindSafe for Connector
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);