/// add_pkg_directory will add a handle to the component's package under /pkg in the namespace.
add_pkg_directory will add a handle to the component's package under /pkg in the namespace.
add_pkg_directory will add a handle to the component ' s package under / pkg in the namespace .
fn add_pkg_directory(
        ns: &mut fsys::ComponentNamespace,
        package_dir: &DirectoryProxy,
    ) -> Result<(), ModelError> {
        let clone_dir_proxy = io_util::clone_directory(package_dir)
            .map_err(|e| ModelError::namespace_creation_failed(e))?;
        let cloned_dir = ClientEnd::new(
            clone_dir_proxy
                .into_channel()
                .expect("could not convert directory to channel")
                .into_zx_channel(),
        );
        ns.paths.push(PKG_PATH.to_str().unwrap().to_string());
        ns.directories.push(cloned_dir);
        Ok(())
    }
fn add_pkg_directory ( ns : & mut fsys :: ComponentNamespace , package_dir : & DirectoryProxy , ) -> Result < ( ) , ModelError > { let clone_dir_proxy = io_util :: clone_directory ( package_dir ) . map_err ( | e | ModelError :: namespace_creation_failed ( e ) ) ? ; let cloned_dir = ClientEnd :: new ( clone_dir_proxy . into_channel ( ) . expect ( " " ) . into_zx_channel ( ) , ) ; ns . paths . push ( PKG_PATH . to_str ( ) . unwrap ( ) . to_string ( ) ) ; ns . directories . push ( cloned_dir ) ; Ok ( ( ) ) }
add_pkg_directory will add a handle to the component's package under /pkg in the namespace.
add_pkg_directory will add a handle to the component ' s package under / pkg in the namespace .
ns
&mut fsys::ComponentNamespace
package_dir
&DirectoryProxy