Struct pdb::CrossModuleImports
source · [−]pub struct CrossModuleImports<'a> { /* private fields */ }
Expand description
Provides efficient access to imported types and IDs from other modules.
This can be used to resolve cross module references. See ItemIndex::is_cross_module
for more
information.
Implementations
sourceimpl<'a> CrossModuleImports<'a>
impl<'a> CrossModuleImports<'a>
sourcepub fn resolve_import<I>(&self, index: I) -> Result<CrossModuleRef<I>> where
I: ItemIndex,
pub fn resolve_import<I>(&self, index: I) -> Result<CrossModuleRef<I>> where
I: ItemIndex,
Resolves the referenced module and local index for the index.
The given index must be a cross module reference. Use ItemIndex::is_cross_module
to
check this before invoking this function. If successful, this function returns a reference
to the module that declares the type, as well as the local index of the type in that module.
Errors
Error::NotACrossModuleRef
if the given index is already a global index and not a cross module reference.Error::CrossModuleRefNotFound
if the cross module reference points to a module or local index that is not indexed by this import table.
Trait Implementations
sourceimpl<'a> Clone for CrossModuleImports<'a>
impl<'a> Clone for CrossModuleImports<'a>
sourcefn clone(&self) -> CrossModuleImports<'a>
fn clone(&self) -> CrossModuleImports<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'a> Debug for CrossModuleImports<'a>
impl<'a> Debug for CrossModuleImports<'a>
sourceimpl<'a> Default for CrossModuleImports<'a>
impl<'a> Default for CrossModuleImports<'a>
sourcefn default() -> CrossModuleImports<'a>
fn default() -> CrossModuleImports<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl<'a> RefUnwindSafe for CrossModuleImports<'a>
impl<'a> Send for CrossModuleImports<'a>
impl<'a> Sync for CrossModuleImports<'a>
impl<'a> Unpin for CrossModuleImports<'a>
impl<'a> UnwindSafe for CrossModuleImports<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more