// Creates a data model with a ZBI containing one component manifest and the provided component
// id index.
Creates a data model with a ZBI containing one component manifest and the provided component
id index.
Creates a data model with a ZBI containing one component manifest and the provided component id index .
fn single_v2_component_model(
        root_component_url: Option<String>,
        component_id_index_path: Option<String>,
        component_id_index: component_id_index::Index,
    ) -> Result<Arc<DataModel>> {
        let model = data_model();
        let root_id = 0;
        let root_component = make_v2_component(
            root_id,
            root_component_url.clone().unwrap_or(DEFAULT_ROOT_URL.to_string()),
        );
        let root_manifest = make_v2_manifest(root_id, new_component_decl(vec![]))?;
        let deps = hashset! { CORE_DEP_STR.to_string() };
        model.set(Components::new(vec![root_component]))?;
        model.set(Manifests::new(vec![root_manifest]))?;
        model
            .set(Zbi { ..zbi(root_component_url, component_id_index_path, component_id_index) })?;
        model.set(CoreDataDeps { deps })?;
        Ok(model)
    }
fn single_v2_component_model ( root_component_url : Option < String > , component_id_index_path : Option < String > , component_id_index : component_id_index :: Index , ) -> Result < Arc < DataModel > > { let model = data_model ( ) ; let root_id = 0 ; let root_component = make_v2_component ( root_id , root_component_url . clone ( ) . unwrap_or ( DEFAULT_ROOT_URL . to_string ( ) ) , ) ; let root_manifest = make_v2_manifest ( root_id , new_component_decl ( vec ! [ ] ) ) ? ; let deps = hashset ! { CORE_DEP_STR to_string ( ) } ; model . set ( Components :: new ( vec ! [ root_component ] ) ) ? ; model . set ( Manifests :: new ( vec ! [ root_manifest ] ) ) ? ; model . set ( Zbi { .. zbi ( root_component_url , component_id_index_path , component_id_index ) } ) ? ; model . set ( CoreDataDeps { deps } ) ? ; Ok ( model ) }
Creates a data model with a ZBI containing one component manifest and the provided component
id index.
Creates a data model with a ZBI containing one component manifest and the provided component id index .
root_component_url
Option<String>
component_id_index_path
Option<String>
component_id_index
component_id_index::Index