pub async fn new<R: IntoIterator<Item = (PathBuf, SafBundle)>>(
        manifest: AppManifest,
        resources: R,
        root_dir: PathBuf,
    ) -> AppBundleResult<Self> {
        let resources = join_all(resources.into_iter().map(|(path, saf_bundle)| async move {
            saf_bundle.encode().map(|bytes| (path, bytes))
        }))
        .await
        .into_iter()
        .collect::<Result<Vec<_>, _>>()?;
        Ok(mr_bundle::Bundle::new(manifest, resources, root_dir)?.into())
    }
/// Create an AppBundle from a manifest and SAF files
Create an AppBundle from a manifest and SAF files
Create an AppBundle from a manifest and SAF files
pub async fn new<R: IntoIterator<Item = (PathBuf, SafBundle)>>(
        manifest: AppManifest,
        resources: R,
        root_dir: PathBuf,
    ) -> AppBundleResult<Self> {
        let resources = join_all(resources.into_iter().map(|(path, saf_bundle)| async move {
            saf_bundle.encode().map(|bytes| (path, bytes))
        }))
        .await
        .into_iter()
        .collect::<Result<Vec<_>, _>>()?;
        Ok(mr_bundle::Bundle::new(manifest, resources, root_dir)?.into())
    }
pub async fn new < R : IntoIterator < Item = ( PathBuf , SafBundle ) > > ( manifest : AppManifest , resources : R , root_dir : PathBuf , ) -> AppBundleResult < Self > { let resources = join_all ( resources . into_iter ( ) . map ( | ( path , saf_bundle ) | async move { saf_bundle . encode ( ) . map ( | bytes | ( path , bytes ) ) } ) ) . await . into_iter ( ) . collect :: < Result < Vec < _ > , _ > > ( ) ? ; Ok ( mr_bundle :: Bundle :: new ( manifest , resources , root_dir ) ? . into ( ) ) }
Create an AppBundle from a manifest and SAF files
Create an AppBundle from a manifest and SAF files
manifest
AppManifest
resources
R
root_dir
PathBuf
manifest
AppManifest
resources
R
root_dir
PathBuf