Skip to main content

DistributedSystemHandle

Trait DistributedSystemHandle 

Source
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§

Source

fn register( &self, c: &dyn UniqueRegistrable, ) -> KFuture<Result<ActorPath, RegistrationError>>

Attempts to register c with the dispatcher using its unique id.

Source

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.

Source

fn register_by_alias<A>( &self, c: &dyn DynActorRefFactory, alias: A, ) -> KFuture<Result<ActorPath, RegistrationError>>
where A: Into<String>,

Attempts to register the provided component with a human-readable alias.

Source

fn update_alias_registration<A>( &self, c: &dyn DynActorRefFactory, alias: A, ) -> KFuture<Result<ActorPath, RegistrationError>>
where A: Into<String>,

Attempts to update the registration for the given alias.

Source

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.

Source

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§

Source§

impl DistributedSystemHandle for ContextSystemHandle

Available on crate feature distributed only.
Source§

impl DistributedSystemHandle for KompactSystem

Available on crate feature distributed only.