pub trait ModuleProvider<'s> {
    // Required method
    fn get_module_info(
        &self,
        module_index: usize,
        module: &Module<'_>
    ) -> Result<Option<&ModuleInfo<'s>>, Error>;
}
Expand description

This trait is only needed for consumers who want to call Context::new_from_parts or TypeFormatter::new_from_parts manually, instead of using ContextPdbData. If you use ContextPdbData you do not need to worry about this trait. This trait allows Context and TypeFormatter to request parsing of module info on-demand. It also does some lifetime acrobatics so that Context can cache objects which have a lifetime dependency on the module info.

Required Methods§

source

fn get_module_info( &self, module_index: usize, module: &Module<'_> ) -> Result<Option<&ModuleInfo<'s>>, Error>

Get the module info for this module from the PDB.

Implementors§

source§

impl<'p, 's, S: Source<'s> + Send + 's> ModuleProvider<'s> for ContextPdbData<'p, 's, S>