pub struct ModuleResolver { /* private fields */ }Expand description
Resolves symbols across module boundaries
Implementations§
Source§impl ModuleResolver
impl ModuleResolver
Sourcepub fn build_symbol_table(&mut self, module: &Module) -> ModuleResult<()>
pub fn build_symbol_table(&mut self, module: &Module) -> ModuleResult<()>
Build symbol table for a module
Sourcepub fn resolve_symbol(
&self,
symbol_name: &str,
current_module: &str,
used_modules: &[String],
) -> ModuleResult<SymbolInfo>
pub fn resolve_symbol( &self, symbol_name: &str, current_module: &str, used_modules: &[String], ) -> ModuleResult<SymbolInfo>
Resolve a symbol in a module’s context
Sourcepub fn get_exported_symbols(&self, module_name: &str) -> Vec<SymbolInfo>
pub fn get_exported_symbols(&self, module_name: &str) -> Vec<SymbolInfo>
Get all symbols exported by a module
Sourcepub fn is_symbol_exported(&self, module_name: &str, symbol_name: &str) -> bool
pub fn is_symbol_exported(&self, module_name: &str, symbol_name: &str) -> bool
Check if a symbol is exported by a module
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModuleResolver
impl RefUnwindSafe for ModuleResolver
impl Send for ModuleResolver
impl Sync for ModuleResolver
impl Unpin for ModuleResolver
impl UnwindSafe for ModuleResolver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more