Skip to main content

RemoteSystem

Struct RemoteSystem 

Source
pub struct RemoteSystem {
    pub system: ActorSystem,
    pub provider: Arc<RemoteActorRefProvider>,
    pub daemon: Arc<RemoteSystemDaemon>,
    pub watcher: Arc<RemoteWatcher>,
    pub address_uid: AddressUid,
    pub local_address: Address,
}
Expand description

Returned by RemoteSystem::start.

Fields§

§system: ActorSystem§provider: Arc<RemoteActorRefProvider>§daemon: Arc<RemoteSystemDaemon>§watcher: Arc<RemoteWatcher>§address_uid: AddressUid§local_address: Address

Implementations§

Source§

impl RemoteSystem

Source

pub async fn start( system: ActorSystem, bind: SocketAddr, settings: RemoteSettings, ) -> Result<Self, TransportError>

Convenience: build a TcpTransport bound to bind, install it on system, and return the wired RemoteSystem.

Source

pub async fn start_with_transport( system: ActorSystem, transport: Arc<dyn Transport>, settings: RemoteSettings, ) -> Result<Self, TransportError>

Source

pub fn endpoint_manager(&self) -> &EndpointManager

Source

pub fn registry(&self) -> &SerializerRegistry

Source

pub fn register_bincode<T>(&self)
where T: Serialize + DeserializeOwned + Send + 'static,

Register the bincode codec for T. Required for any user message type that crosses the wire.

Source

pub fn register_json<T>(&self)
where T: Serialize + DeserializeOwned + Send + 'static,

Register the JSON codec for T.

Source

pub fn expose_actor<M>(&self, target: ActorRef<M>)
where M: Send + 'static,

Register a local actor as the destination for inbound remote messages addressed to its path. Caller must already have the codec for M registered.

Source

pub fn actor_selection<M>(&self, path: &str) -> Option<ActorRef<M>>
where M: Serialize + Send + 'static,

Look up a remote actor by full path string, returning a typed ActorRef<M> with the bincode codec for M. Caller is responsible for matching M to whatever the receiving side declares.

Source

pub fn actor_selection_untyped(&self, path: &str) -> Option<UntypedActorRef>

Untyped variant — useful for system-message-only refs (e.g. remote watchers).

Source

pub async fn shutdown(&self)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> Extension for T
where T: Any + Send + Sync,