async fn dispatch_capabilities_ready(
        &self,
        outgoing_dir: DirectoryProxy,
        expose_decls: Vec<ExposeDecl>,
        target_moniker: &AbsoluteMoniker,
    ) {
        for expose_decl in expose_decls {
            match expose_decl {
                ExposeDecl::Directory(ExposeDirectoryDecl { target_path, rights, .. }) => {
                    self.dispatch_capability_ready(
                        &outgoing_dir,
                        fio::MODE_TYPE_DIRECTORY,
                        Rights::from(rights.unwrap_or(*READ_RIGHTS)),
                        target_path,
                        target_moniker.clone(),
                    )
                    .await
                }
                ExposeDecl::Protocol(ExposeProtocolDecl { target_path, .. }) => {
                    self.dispatch_capability_ready(
                        &outgoing_dir,
                        fio::MODE_TYPE_SERVICE,
                        Rights::from(*WRITE_RIGHTS),
                        target_path,
                        target_moniker.clone(),
                    )
                    .await
                }
                _ => Ok(()),
            }
            .unwrap_or_else(|e| {
                error!("Error notifying capability ready for {}: {:?}", target_moniker, e)
            });
        }
    }
/// Waits for the exposed directory to be ready and then notifies about all the capabilities
/// inside it that were exposed to the framework by the component.
Waits for the exposed directory to be ready and then notifies about all the capabilities
inside it that were exposed to the framework by the component.
Waits for the exposed directory to be ready and then notifies about all the capabilities inside it that were exposed to the framework by the component .
async fn dispatch_capabilities_ready(
        &self,
        outgoing_dir: DirectoryProxy,
        expose_decls: Vec<ExposeDecl>,
        target_moniker: &AbsoluteMoniker,
    ) {
        for expose_decl in expose_decls {
            match expose_decl {
                ExposeDecl::Directory(ExposeDirectoryDecl { target_path, rights, .. }) => {
                    self.dispatch_capability_ready(
                        &outgoing_dir,
                        fio::MODE_TYPE_DIRECTORY,
                        Rights::from(rights.unwrap_or(*READ_RIGHTS)),
                        target_path,
                        target_moniker.clone(),
                    )
                    .await
                }
                ExposeDecl::Protocol(ExposeProtocolDecl { target_path, .. }) => {
                    self.dispatch_capability_ready(
                        &outgoing_dir,
                        fio::MODE_TYPE_SERVICE,
                        Rights::from(*WRITE_RIGHTS),
                        target_path,
                        target_moniker.clone(),
                    )
                    .await
                }
                _ => Ok(()),
            }
            .unwrap_or_else(|e| {
                error!("Error notifying capability ready for {}: {:?}", target_moniker, e)
            });
        }
    }
async fn dispatch_capabilities_ready ( & self , outgoing_dir : DirectoryProxy , expose_decls : Vec < ExposeDecl > , target_moniker : & AbsoluteMoniker , ) { for expose_decl in expose_decls { match expose_decl { ExposeDecl :: Directory ( ExposeDirectoryDecl { target_path , rights , .. } ) => { self . dispatch_capability_ready ( & outgoing_dir , fio :: MODE_TYPE_DIRECTORY , Rights :: from ( rights . unwrap_or ( * READ_RIGHTS ) ) , target_path , target_moniker . clone ( ) , ) . await } ExposeDecl :: Protocol ( ExposeProtocolDecl { target_path , .. } ) => { self . dispatch_capability_ready ( & outgoing_dir , fio :: MODE_TYPE_SERVICE , Rights :: from ( * WRITE_RIGHTS ) , target_path , target_moniker . clone ( ) , ) . await } _ => Ok ( ( ) ) , } . unwrap_or_else ( | e | { error ! ( " " target_moniker e ) } ) ; } }
Waits for the exposed directory to be ready and then notifies about all the capabilities
inside it that were exposed to the framework by the component.
Waits for the exposed directory to be ready and then notifies about all the capabilities inside it that were exposed to the framework by the component .
&self
outgoing_dir
DirectoryProxy
expose_decls
Vec<ExposeDecl>
target_moniker
&AbsoluteMoniker
&self
outgoing_dir
DirectoryProxy
expose_decls
Vec<ExposeDecl>
target_moniker
&AbsoluteMoniker