/// Verification of a module in isolation (using `VerifiedModule::new`) trusts that struct and
/// function handles not implemented in the module are declared correctly. The following procedure
/// justifies this trust by checking that these declarations match the definitions in the module
/// dependencies. Each dependency of 'module' is looked up in 'dependencies'.  If not found, an
/// error is included in the returned list of errors.  If found, usage of types and functions of the
/// dependency in 'module' is checked against the declarations in the found module and mismatch
/// errors are returned.
Verification of a module in isolation (using `VerifiedModule::new`) trusts that struct and
function handles not implemented in the module are declared correctly. The following procedure
justifies this trust by checking that these declarations match the definitions in the module
dependencies. Each dependency of 'module' is looked up in 'dependencies'.  If not found, an
error is included in the returned list of errors.  If found, usage of types and functions of the
dependency in 'module' is checked against the declarations in the found module and mismatch
errors are returned.
Verification of a module in isolation ( using ` VerifiedModule :: new ` ) trusts that struct and function handles not implemented in the module are declared correctly . The following procedure justifies this trust by checking that these declarations match the definitions in the module dependencies . Each dependency of ' module ' is looked up in ' dependencies ' . If not found an error is included in the returned list of errors . If found usage of types and functions of the dependency in ' module ' is checked against the declarations in the found module and mismatch errors are returned .
pub fn verify_module_dependencies(
    module: CompiledModule,
    dependencies: &[CompiledModule],
) -> (CompiledModule, Vec<VerificationError>) {
    let module_id = module.self_id();
    let mut dependency_map = BTreeMap::new();
    for dependency in dependencies {
        let dependency_id = dependency.self_id();
        if module_id != dependency_id {
            dependency_map.insert(dependency_id, dependency);
        }
    }
    let mut errors = vec![];
    let module_view = ModuleView::new(&module);
    errors.append(&mut verify_struct_kind(&module_view, &dependency_map));
    errors.append(&mut verify_function_visibility_and_type(
        &module_view,
        &dependency_map,
    ));
    errors.append(&mut verify_all_dependencies_provided(
        &module_view,
        &dependency_map,
    ));
    (module, errors)
}
pub fn verify_module_dependencies ( module : CompiledModule , dependencies : & [ CompiledModule ] , ) -> ( CompiledModule , Vec < VerificationError > ) { let module_id = module . self_id ( ) ; let mut dependency_map = BTreeMap :: new ( ) ; for dependency in dependencies { let dependency_id = dependency . self_id ( ) ; if module_id != dependency_id { dependency_map . insert ( dependency_id , dependency ) ; } } let mut errors = vec ! [ ] ; let module_view = ModuleView :: new ( & module ) ; errors . append ( & mut verify_struct_kind ( & module_view , & dependency_map ) ) ; errors . append ( & mut verify_function_visibility_and_type ( & module_view , & dependency_map , ) ) ; errors . append ( & mut verify_all_dependencies_provided ( & module_view , & dependency_map , ) ) ; ( module , errors ) }
Verification of a module in isolation (using `VerifiedModule::new`) trusts that struct and
function handles not implemented in the module are declared correctly.
Verification of a module in isolation ( using ` VerifiedModule :: new ` ) trusts that struct and function handles not implemented in the module are declared correctly .
module
CompiledModule
dependencies
&[CompiledModule]