pub trait ChildRouter: Send + Sync {
// Required methods
fn router_namespace(&self) -> &str;
fn router_call<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = PlexusStreamItem> + Send>>, PlexusError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn get_child<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<Box<dyn ChildRouter>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}Expand description
Trait for activations that can route to child activations
Hub activations implement this to support nested method routing. When a method like “mercury.info” is called on a solar activation, this trait enables routing to the mercury child.
This trait is separate from Activation to avoid associated type issues with dynamic dispatch.
Required Methods§
Sourcefn router_namespace(&self) -> &str
fn router_namespace(&self) -> &str
Get the namespace of this router (for error messages)
Sourcefn router_call<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = PlexusStreamItem> + Send>>, PlexusError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn router_call<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = PlexusStreamItem> + Send>>, PlexusError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Call a method on this router
Implementations on Foreign Types§
Source§impl ChildRouter for HyperforgeHub
ChildRouter implementation for nested method routing
impl ChildRouter for HyperforgeHub
ChildRouter implementation for nested method routing
fn router_namespace(&self) -> &str
fn router_call<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = PlexusStreamItem> + Send>>, PlexusError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
HyperforgeHub: 'async_trait,
fn get_child<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<Box<dyn ChildRouter>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
HyperforgeHub: 'async_trait,
Source§impl ChildRouter for RepoHub
impl ChildRouter for RepoHub
fn router_namespace(&self) -> &str
fn router_call<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = PlexusStreamItem> + Send>>, PlexusError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
RepoHub: 'async_trait,
fn get_child<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<Box<dyn ChildRouter>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
RepoHub: 'async_trait,
Source§impl ChildRouter for WorkspaceHub
impl ChildRouter for WorkspaceHub
fn router_namespace(&self) -> &str
fn router_call<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = PlexusStreamItem> + Send>>, PlexusError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
WorkspaceHub: 'async_trait,
fn get_child<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<Box<dyn ChildRouter>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
WorkspaceHub: 'async_trait,
Implementors§
impl ChildRouter for Solar
ChildRouter implementation for nested method routing
This enables calls like solar.mercury.info to route through
Solar → Mercury → info method.
impl ChildRouter for DynamicHub
ChildRouter implementation for DynamicHub
This enables nested routing through registered activations. e.g., hub.call(“solar.mercury.info”) routes to solar → mercury → info