pub async fn from_zomes(
        uid: String,
        zomes: Vec<(ZomeName, ZomeDef)>,
        wasms: Vec<wasm::SafWasm>,
    ) -> SafResult<(SafFile, Vec<Zome>)> {
        let saf_def = SafDefBuilder::default()
            .uid(uid)
            .zomes(zomes.clone())
            .build()
            .unwrap();

        let saf_file = SafFile::new(saf_def, wasms).await?;
        let zomes: Vec<Zome> = zomes.into_iter().map(|(n, z)| Zome::new(n, z)).collect();
        Ok((saf_file, zomes))
    }
/// Create a SafFile from a collection of Zomes
Create a SafFile from a collection of Zomes
Create a SafFile from a collection of Zomes
pub async fn from_zomes(
        uid: String,
        zomes: Vec<(ZomeName, ZomeDef)>,
        wasms: Vec<wasm::SafWasm>,
    ) -> SafResult<(SafFile, Vec<Zome>)> {
        let saf_def = SafDefBuilder::default()
            .uid(uid)
            .zomes(zomes.clone())
            .build()
            .unwrap();
        let saf_file = SafFile::new(saf_def, wasms).await?;
        let zomes: Vec<Zome> = zomes.into_iter().map(|(n, z)| Zome::new(n, z)).collect();
        Ok((saf_file, zomes))
    }
pub async fn from_zomes ( uid : String , zomes : Vec < ( ZomeName , ZomeDef ) > , wasms : Vec < wasm :: SafWasm > , ) -> SafResult < ( SafFile , Vec < Zome > ) > { let saf_def = SafDefBuilder :: default ( ) . uid ( uid ) . zomes ( zomes . clone ( ) ) . build ( ) . unwrap ( ) ; let saf_file = SafFile :: new ( saf_def , wasms ) . await ? ; let zomes : Vec < Zome > = zomes . into_iter ( ) . map ( | ( n , z ) | Zome :: new ( n , z ) ) . collect ( ) ; Ok ( ( saf_file , zomes ) ) }
Create a SafFile from a collection of Zomes
Create a SafFile from a collection of Zomes
uid
String
zomes
Vec<(ZomeName, ZomeDef)>
wasms
Vec<wasm::SafWasm>
uid
String
zomes
Vec<(ZomeName, ZomeDef)>
wasms
Vec<wasm::SafWasm>