pub async fn route_directory_from_expose(
    expose_decl: ExposeDirectoryDecl,
    target: &Arc<ComponentInstance>,
) -> Result<(CapabilitySource, DirectoryState), RoutingError> {
    let mut state = DirectoryState { rights: WalkState::new(), subdir: PathBuf::new() };
    let allowed_sources = AllowedSourcesBuilder::new()
        .framework(InternalCapability::Directory)
        .builtin(InternalCapability::Directory)
        .namespace()
        .component();
    let source = RoutingStrategy::new()
        .use_::<UseDirectoryDecl>()
        .offer::<OfferDirectoryDecl>()
        .expose::<ExposeDirectoryDecl>()
        .route_from_expose(expose_decl, target.clone(), allowed_sources, &mut state)
        .await?;
    Ok((source, state))
}
/// Routes a Directory capability from `target` to its source, starting from `expose_decl`.
/// Returns the capability source, along with a `DirectoryState` accumulated from traversing
/// the route.
Routes a Directory capability from `target` to its source, starting from `expose_decl`.
Returns the capability source, along with a `DirectoryState` accumulated from traversing
the route.
Routes a Directory capability from ` target ` to its source starting from ` expose_decl ` . Returns the capability source along with a ` DirectoryState ` accumulated from traversing the route .
pub async fn route_directory_from_expose(
    expose_decl: ExposeDirectoryDecl,
    target: &Arc<ComponentInstance>,
) -> Result<(CapabilitySource, DirectoryState), RoutingError> {
    let mut state = DirectoryState { rights: WalkState::new(), subdir: PathBuf::new() };
    let allowed_sources = AllowedSourcesBuilder::new()
        .framework(InternalCapability::Directory)
        .builtin(InternalCapability::Directory)
        .namespace()
        .component();
    let source = RoutingStrategy::new()
        .use_::<UseDirectoryDecl>()
        .offer::<OfferDirectoryDecl>()
        .expose::<ExposeDirectoryDecl>()
        .route_from_expose(expose_decl, target.clone(), allowed_sources, &mut state)
        .await?;
    Ok((source, state))
}
pub async fn route_directory_from_expose ( expose_decl : ExposeDirectoryDecl , target : & Arc < ComponentInstance > , ) -> Result < ( CapabilitySource , DirectoryState ) , RoutingError > { let mut state = DirectoryState { rights : WalkState :: new ( ) , subdir : PathBuf :: new ( ) } ; let allowed_sources = AllowedSourcesBuilder :: new ( ) . framework ( InternalCapability :: Directory ) . builtin ( InternalCapability :: Directory ) . namespace ( ) . component ( ) ; let source = RoutingStrategy :: new ( ) . use_ :: < UseDirectoryDecl > ( ) . offer :: < OfferDirectoryDecl > ( ) . expose :: < ExposeDirectoryDecl > ( ) . route_from_expose ( expose_decl , target . clone ( ) , allowed_sources , & mut state ) . await ? ; Ok ( ( source , state ) ) }
Routes a Directory capability from `target` to its source, starting from `expose_decl`.
Routes a Directory capability from ` target ` to its source starting from ` expose_decl ` .
expose_decl
ExposeDirectoryDecl
target
&Arc<ComponentInstance>
expose_decl
ExposeDirectoryDecl
target
&Arc<ComponentInstance>