pub async fn route_protocol_from_expose(
    expose_decl: ExposeProtocolDecl,
    target: &Arc<ComponentInstance>,
) -> Result<CapabilitySource, RoutingError> {
    let allowed_sources = AllowedSourcesBuilder::new()
        .framework(InternalCapability::Protocol)
        .builtin(InternalCapability::Protocol)
        .namespace()
        .component()
        .capability();
    RoutingStrategy::new()
        .use_::<UseProtocolDecl>()
        .offer::<OfferProtocolDecl>()
        .expose::<ExposeProtocolDecl>()
        .route_from_expose(expose_decl, target.clone(), allowed_sources, &mut ProtocolVisitor)
        .await
}
/// Routes a Protocol capability from `target` to its source, starting from `expose_decl`.
Routes a Protocol capability from `target` to its source, starting from `expose_decl`.
Routes a Protocol capability from ` target ` to its source starting from ` expose_decl ` .
pub async fn route_protocol_from_expose(
    expose_decl: ExposeProtocolDecl,
    target: &Arc<ComponentInstance>,
) -> Result<CapabilitySource, RoutingError> {
    let allowed_sources = AllowedSourcesBuilder::new()
        .framework(InternalCapability::Protocol)
        .builtin(InternalCapability::Protocol)
        .namespace()
        .component()
        .capability();
    RoutingStrategy::new()
        .use_::<UseProtocolDecl>()
        .offer::<OfferProtocolDecl>()
        .expose::<ExposeProtocolDecl>()
        .route_from_expose(expose_decl, target.clone(), allowed_sources, &mut ProtocolVisitor)
        .await
}
pub async fn route_protocol_from_expose ( expose_decl : ExposeProtocolDecl , target : & Arc < ComponentInstance > , ) -> Result < CapabilitySource , RoutingError > { let allowed_sources = AllowedSourcesBuilder :: new ( ) . framework ( InternalCapability :: Protocol ) . builtin ( InternalCapability :: Protocol ) . namespace ( ) . component ( ) . capability ( ) ; RoutingStrategy :: new ( ) . use_ :: < UseProtocolDecl > ( ) . offer :: < OfferProtocolDecl > ( ) . expose :: < ExposeProtocolDecl > ( ) . route_from_expose ( expose_decl , target . clone ( ) , allowed_sources , & mut ProtocolVisitor ) . await }
Routes a Protocol capability from `target` to its source, starting from `expose_decl`.
Routes a Protocol capability from ` target ` to its source starting from ` expose_decl ` .
expose_decl
ExposeProtocolDecl
target
&Arc<ComponentInstance>
expose_decl
ExposeProtocolDecl
target
&Arc<ComponentInstance>