pub trait DistributedSystemHandle: SystemHandle + Dispatching {
// Required methods
fn register(
&self,
c: &dyn UniqueRegistrable,
) -> KFuture<Result<ActorPath, RegistrationError>> ⓘ;
fn create_and_register<C, F>(
&self,
f: F,
) -> (Arc<Component<C>>, KFuture<Result<ActorPath, RegistrationError>>)
where F: FnOnce() -> C,
C: ComponentDefinition + 'static;
fn register_by_alias<A>(
&self,
c: &dyn DynActorRefFactory,
alias: A,
) -> KFuture<Result<ActorPath, RegistrationError>> ⓘ
where A: Into<String>;
fn update_alias_registration<A>(
&self,
c: &dyn DynActorRefFactory,
alias: A,
) -> KFuture<Result<ActorPath, RegistrationError>> ⓘ
where A: Into<String>;
fn set_routing_policy<P>(
&self,
policy: P,
path: &str,
update: bool,
) -> KFuture<Result<ActorPath, RegistrationError>> ⓘ
where P: Into<StorePolicy>;
fn system_path(&self) -> SystemPath;
}Expand description
Distributed-only extensions for a SystemHandle.
Required Methods§
Sourcefn register(
&self,
c: &dyn UniqueRegistrable,
) -> KFuture<Result<ActorPath, RegistrationError>> ⓘ
fn register( &self, c: &dyn UniqueRegistrable, ) -> KFuture<Result<ActorPath, RegistrationError>> ⓘ
Attempts to register c with the dispatcher using its unique id.
Sourcefn create_and_register<C, F>(
&self,
f: F,
) -> (Arc<Component<C>>, KFuture<Result<ActorPath, RegistrationError>>)where
F: FnOnce() -> C,
C: ComponentDefinition + 'static,
fn create_and_register<C, F>(
&self,
f: F,
) -> (Arc<Component<C>>, KFuture<Result<ActorPath, RegistrationError>>)where
F: FnOnce() -> C,
C: ComponentDefinition + 'static,
Creates a new component and registers it with the dispatcher.
Sourcefn register_by_alias<A>(
&self,
c: &dyn DynActorRefFactory,
alias: A,
) -> KFuture<Result<ActorPath, RegistrationError>> ⓘ
fn register_by_alias<A>( &self, c: &dyn DynActorRefFactory, alias: A, ) -> KFuture<Result<ActorPath, RegistrationError>> ⓘ
Attempts to register the provided component with a human-readable alias.
Sourcefn update_alias_registration<A>(
&self,
c: &dyn DynActorRefFactory,
alias: A,
) -> KFuture<Result<ActorPath, RegistrationError>> ⓘ
fn update_alias_registration<A>( &self, c: &dyn DynActorRefFactory, alias: A, ) -> KFuture<Result<ActorPath, RegistrationError>> ⓘ
Attempts to update the registration for the given alias.
Sourcefn set_routing_policy<P>(
&self,
policy: P,
path: &str,
update: bool,
) -> KFuture<Result<ActorPath, RegistrationError>> ⓘwhere
P: Into<StorePolicy>,
fn set_routing_policy<P>(
&self,
policy: P,
path: &str,
update: bool,
) -> KFuture<Result<ActorPath, RegistrationError>> ⓘwhere
P: Into<StorePolicy>,
Attempts to set the routing policy at path.
Sourcefn system_path(&self) -> SystemPath
fn system_path(&self) -> SystemPath
Return the system path of this Kompact system.
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§
impl DistributedSystemHandle for ContextSystemHandle
Available on crate feature
distributed only.impl DistributedSystemHandle for KompactSystem
Available on crate feature
distributed only.