Skip to main content

ChildRouter

Trait ChildRouter 

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

Source

fn router_namespace(&self) -> &str

Get the namespace of this router (for error messages)

Source

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

Source

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,

Get a child activation instance by name for nested routing

Implementations on Foreign Types§

Source§

impl ChildRouter for Registry

Source§

fn router_namespace(&self) -> &str

Source§

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,

Source§

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§

Source§

impl ChildRouter for Bash

Source§

impl ChildRouter for Changelog

Source§

impl ChildRouter for Chaos

Source§

impl ChildRouter for ClaudeCodeLoopback

Source§

impl ChildRouter for plexus_substrate::activations::echo::Echo

Source§

impl ChildRouter for plexus_substrate::activations::health::Health

Source§

impl ChildRouter for Interactive

Source§

impl ChildRouter for Lattice

Source§

impl ChildRouter for Mustache

Source§

impl ChildRouter for Pm

Source§

impl ChildRouter for Solar

ChildRouter implementation for nested method routing

This enables calls like solar.mercury.info to route through Solar → Mercury → info method.

Source§

impl ChildRouter for plexus_core::activations::echo::activation::Echo

Source§

impl ChildRouter for plexus_core::activations::health::activation::Health

ChildRouter implementation for Health — leaf activation, no children.

Source§

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

Source§

impl<P: HubContext + 'static> ChildRouter for Orcha<P>

Source§

impl<P: HubContext> ChildRouter for Arbor<P>

Source§

impl<P: HubContext> ChildRouter for ClaudeCode<P>

Source§

impl<P: HubContext> ChildRouter for Cone<P>