pub trait ChildRouter: Send + Sync {
// Required methods
fn router_namespace(&self) -> &str;
fn router_call<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
auth: Option<&'life2 AuthContext>,
raw_ctx: Option<&'life3 RawRequestContext>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = PlexusStreamItem> + Send>>, PlexusError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: '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, 'life2, 'life3, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
auth: Option<&'life2 AuthContext>,
raw_ctx: Option<&'life3 RawRequestContext>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = PlexusStreamItem> + Send>>, PlexusError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn router_call<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
auth: Option<&'life2 AuthContext>,
raw_ctx: Option<&'life3 RawRequestContext>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = PlexusStreamItem> + Send>>, PlexusError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Call a method on this router
Implementations on Foreign Types§
Source§impl ChildRouter for Registry
impl ChildRouter for Registry
fn router_namespace(&self) -> &str
fn router_call<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
auth: Option<&'life2 AuthContext>,
raw_ctx: Option<&'life3 RawRequestContext>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = PlexusStreamItem> + Send>>, PlexusError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Registry: '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,
Registry: 'async_trait,
Implementors§
impl ChildRouter for Bash
impl ChildRouter for Changelog
impl ChildRouter for Chaos
impl ChildRouter for ClaudeCodeLoopback
impl ChildRouter for plexus_substrate::activations::echo::Echo
impl ChildRouter for plexus_substrate::activations::health::Health
impl ChildRouter for Interactive
impl ChildRouter for Lattice
impl ChildRouter for Mustache
impl ChildRouter for Pm
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 plexus_core::activations::echo::activation::Echo
impl ChildRouter for plexus_core::activations::health::activation::Health
ChildRouter implementation for Health — leaf activation, no children.
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