Function routing::route_capability
source · pub async fn route_capability<C>(
request: RouteRequest,
target: &Arc<C>,
mapper: &mut dyn DebugRouteMapper
) -> Result<RouteSource<C>, RoutingError>where
C: ComponentInstanceInterface + 'static,
Expand description
Routes a capability to its source.
If the capability is not allowed to be routed to the target
, per the
[crate::model::policy::GlobalPolicyChecker
], then an error is returned.
The mapper
is invoked on every step in the routing process and can
be used to record the routing steps.