pub struct ModuleResolutionDebugger {
pub declaration_events: Vec<SymbolDeclarationEvent>,
pub lookup_events: Vec<SymbolLookupEvent>,
pub merge_events: Vec<SymbolMergeEvent>,
pub symbol_origins: HashMap<SymbolId, String, FxBuildHasher>,
pub current_file: String,
}Expand description
Debugger for module resolution operations.
Fields§
§declaration_events: Vec<SymbolDeclarationEvent>All symbol declaration events
lookup_events: Vec<SymbolLookupEvent>All symbol lookup events
merge_events: Vec<SymbolMergeEvent>All symbol merge events
symbol_origins: HashMap<SymbolId, String, FxBuildHasher>Symbol origins: maps SymbolId to the file name where it was first declared
current_file: StringCurrent file being processed
Implementations§
Source§impl ModuleResolutionDebugger
impl ModuleResolutionDebugger
Sourcepub fn new() -> ModuleResolutionDebugger
pub fn new() -> ModuleResolutionDebugger
Create a new debugger instance.
Sourcepub fn set_current_file(&mut self, file_name: &str)
pub fn set_current_file(&mut self, file_name: &str)
Set the current file being processed.
Sourcepub fn record_declaration(
&mut self,
name: &str,
symbol_id: SymbolId,
flags: u32,
declaration_count: usize,
is_merge: bool,
)
pub fn record_declaration( &mut self, name: &str, symbol_id: SymbolId, flags: u32, declaration_count: usize, is_merge: bool, )
Record a symbol declaration.
Sourcepub fn record_merge(
&mut self,
name: &str,
symbol_id: SymbolId,
existing_flags: u32,
new_flags: u32,
combined_flags: u32,
)
pub fn record_merge( &mut self, name: &str, symbol_id: SymbolId, existing_flags: u32, new_flags: u32, combined_flags: u32, )
Record a symbol merge operation.
Sourcepub fn record_lookup(
&mut self,
name: &str,
scope_path: &[String],
result: Option<SymbolId>,
)
pub fn record_lookup( &mut self, name: &str, scope_path: &[String], result: Option<SymbolId>, )
Record a symbol lookup.
Sourcepub fn get_summary(&self) -> String
pub fn get_summary(&self) -> String
Get a summary of all recorded events.
Trait Implementations§
Source§impl Debug for ModuleResolutionDebugger
impl Debug for ModuleResolutionDebugger
Source§impl Default for ModuleResolutionDebugger
impl Default for ModuleResolutionDebugger
Source§fn default() -> ModuleResolutionDebugger
fn default() -> ModuleResolutionDebugger
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ModuleResolutionDebugger
impl RefUnwindSafe for ModuleResolutionDebugger
impl Send for ModuleResolutionDebugger
impl Sync for ModuleResolutionDebugger
impl Unpin for ModuleResolutionDebugger
impl UnsafeUnpin for ModuleResolutionDebugger
impl UnwindSafe for ModuleResolutionDebugger
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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