pub fn resolve_struct_handle_with_fetcher<F: ModuleFetcher>(
        &self,
        module: &LoadedModule,
        idx: StructHandleIndex,
        gas_meter: &GasMeter,
        fetcher: &F,
    ) -> VMResult<Option<StructDef>> {
        let struct_handle = module.struct_handle_at(idx);
        let struct_name = module.identifier_at(struct_handle.name);
        let struct_def_module_id = StructHandleView::new(module, struct_handle).module_id();
        match self.get_loaded_module_with_fetcher(&struct_def_module_id, fetcher) {
            Ok(Some(module)) => {
                let struct_def_idx = module
                    .struct_defs_table
                    .get(struct_name)
                    .ok_or_else(|| VMStatus::new(StatusCode::LINKER_ERROR))?;
                self.resolve_struct_def_with_fetcher(module, *struct_def_idx, gas_meter, fetcher)
            }
            Ok(None) => Ok(None),
            Err(errors) => Err(errors),
        }
    }
/// Resolve a StructHandle into a StructDef recursively in either the cache or the `fetcher`.
Resolve a StructHandle into a StructDef recursively in either the cache or the `fetcher`.
Resolve a StructHandle into a StructDef recursively in either the cache or the ` fetcher ` .
pub fn resolve_struct_handle_with_fetcher<F: ModuleFetcher>(
        &self,
        module: &LoadedModule,
        idx: StructHandleIndex,
        gas_meter: &GasMeter,
        fetcher: &F,
    ) -> VMResult<Option<StructDef>> {
        let struct_handle = module.struct_handle_at(idx);
        let struct_name = module.identifier_at(struct_handle.name);
        let struct_def_module_id = StructHandleView::new(module, struct_handle).module_id();
        match self.get_loaded_module_with_fetcher(&struct_def_module_id, fetcher) {
            Ok(Some(module)) => {
                let struct_def_idx = module
                    .struct_defs_table
                    .get(struct_name)
                    .ok_or_else(|| VMStatus::new(StatusCode::LINKER_ERROR))?;
                self.resolve_struct_def_with_fetcher(module, *struct_def_idx, gas_meter, fetcher)
            }
            Ok(None) => Ok(None),
            Err(errors) => Err(errors),
        }
    }
pub fn resolve_struct_handle_with_fetcher < F : ModuleFetcher > ( & self , module : & LoadedModule , idx : StructHandleIndex , gas_meter : & GasMeter , fetcher : & F , ) -> VMResult < Option < StructDef > > { let struct_handle = module . struct_handle_at ( idx ) ; let struct_name = module . identifier_at ( struct_handle . name ) ; let struct_def_module_id = StructHandleView :: new ( module , struct_handle ) . module_id ( ) ; match self . get_loaded_module_with_fetcher ( & struct_def_module_id , fetcher ) { Ok ( Some ( module ) ) => { let struct_def_idx = module . struct_defs_table . get ( struct_name ) . ok_or_else ( | | VMStatus :: new ( StatusCode :: LINKER_ERROR ) ) ? ; self . resolve_struct_def_with_fetcher ( module , * struct_def_idx , gas_meter , fetcher ) } Ok ( None ) => Ok ( None ) , Err ( errors ) => Err ( errors ) , } }
Resolve a StructHandle into a StructDef recursively in either the cache or the `fetcher`.
Resolve a StructHandle into a StructDef recursively in either the cache or the ` fetcher ` .
&self
module
&LoadedModule
idx
StructHandleIndex
gas_meter
&GasMeter
fetcher
&F