pub struct FileCallData {
pub calls_by_symbol: HashMap<String, Vec<CallSite>>,
pub value_refs_by_symbol: HashMap<String, Vec<CallSite>>,
pub macro_body_calls_by_macro: HashMap<String, Vec<CallSite>>,
pub macro_mentions_by_symbol: HashMap<String, Vec<CallSite>>,
pub exported_symbols: Vec<String>,
pub symbol_metadata: HashMap<String, SymbolMeta>,
pub default_export_symbol: Option<String>,
pub import_block: ImportBlock,
pub python_bindings: Vec<CallBinding>,
pub lang: LangId,
}Expand description
Per-file call data: call sites grouped by containing symbol, plus exported symbol names and parsed imports.
Fields§
§calls_by_symbol: HashMap<String, Vec<CallSite>>Map from symbol name → list of call sites within that symbol’s body.
value_refs_by_symbol: HashMap<String, Vec<CallSite>>Rust function items referenced as values, grouped by containing symbol. Callable targets participate in reverse references, not execution trees.
macro_body_calls_by_macro: HashMap<String, Vec<CallSite>>Calls written in a macro_rules! template outside any item defined in
that template, keyed by macro name with its ! (e.g. check!). They
run wherever the macro is invoked, so callers reports the macro’s
invocation sites for them instead of a caller in this file.
macro_mentions_by_symbol: HashMap<String, Vec<CallSite>>Identifiers inside Rust macro token trees that could not be parsed as
Rust, grouped by containing symbol. callers counts these as mentions
it could not analyze, so a target named only there is not reported as
having no callers without comment.
exported_symbols: Vec<String>Names of exported symbols in this file.
symbol_metadata: HashMap<String, SymbolMeta>Per-symbol metadata (kind, exported, signature).
default_export_symbol: Option<String>Real or synthetic symbol name for this file’s default export.
import_block: ImportBlockParsed import block for cross-file resolution.
python_bindings: Vec<CallBinding>Lexically selected Python import bindings, sorted by call-expression span.
lang: LangIdLanguage of the file.
Implementations§
Source§impl FileCallData
impl FileCallData
Sourcepub fn symbol_metadata_for(&self, name: &str) -> Option<&SymbolMeta>
pub fn symbol_metadata_for(&self, name: &str) -> Option<&SymbolMeta>
Look up metadata for an exported symbol name.
exported_symbols stores bare names (e.g. total_disk_bytes), but
symbol_metadata is keyed by scoped identity (e.g.
BackupStore::total_disk_bytes for impl methods, via
[symbol_identity]). A bare-name .get() therefore misses scoped
symbols and forces callers into degraded unknown/line-1 fallbacks.
This resolves an exact key first, then falls back to the first entry
whose unqualified name matches — recovering correct kind and line for
methods. (Bare-name exports are already ambiguous across scopes, so
first-match is the best available signal; this only affects displayed
metadata, never liveness, which keys on the symbol name.)
Trait Implementations§
Source§impl Clone for FileCallData
impl Clone for FileCallData
Auto Trait Implementations§
impl Forget for FileCallData
impl Freeze for FileCallData
impl Move for FileCallData
impl RefUnwindSafe for FileCallData
impl Send for FileCallData
impl Sync for FileCallData
impl Unpin for FileCallData
impl UnsafeUnpin for FileCallData
impl UnwindSafe for FileCallData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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> ⓘ
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> ⓘ
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