pub struct CallGraphInfo {
pub calls: HashMap<String, Vec<String>>,
pub called_by: HashMap<String, Vec<String>>,
}Expand description
Module-level call graph information.
Tracks which functions in this module call which other functions.
This is a lightweight, per-module representation of call relationships,
distinct from the project-wide CallGraph in the callgraph module.
Fields§
§calls: HashMap<String, Vec<String>>Map of caller function name to list of called function names. Key is the caller (e.g., “process_data” or “MyClass.method”), value is a list of callees (function names being called).
called_by: HashMap<String, Vec<String>>Reverse mapping: function name to list of functions that call it. Key is the callee, value is list of callers. This enables efficient reverse lookups for impact analysis.
Implementations§
Source§impl CallGraphInfo
impl CallGraphInfo
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new empty call graph.
Part of public API for library consumers building call graphs programmatically.
Sourcepub fn add_call(&mut self, caller: &str, callee: &str)
pub fn add_call(&mut self, caller: &str, callee: &str)
Record a function call, updating both forward and reverse mappings.
Part of public API for library consumers building call graphs programmatically.
§Arguments
caller- The name of the calling functioncallee- The name of the called function
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Check if the call graph is empty.
Part of public API for library consumers querying call graphs.
Trait Implementations§
Source§impl Clone for CallGraphInfo
impl Clone for CallGraphInfo
Source§fn clone(&self) -> CallGraphInfo
fn clone(&self) -> CallGraphInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CallGraphInfo
impl Debug for CallGraphInfo
Source§impl Default for CallGraphInfo
impl Default for CallGraphInfo
Source§fn default() -> CallGraphInfo
fn default() -> CallGraphInfo
Source§impl<'de> Deserialize<'de> for CallGraphInfo
impl<'de> Deserialize<'de> for CallGraphInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for CallGraphInfo
impl RefUnwindSafe for CallGraphInfo
impl Send for CallGraphInfo
impl Sync for CallGraphInfo
impl Unpin for CallGraphInfo
impl UnwindSafe for CallGraphInfo
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> 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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request