pub struct CallGraph {
pub nodes: HashMap<String, CallGraphNode>,
pub analysis_order: Vec<String>,
}Expand description
Call graph representing function call relationships
Fields§
§nodes: HashMap<String, CallGraphNode>Function name → CallGraphNode
analysis_order: Vec<String>Analysis order (bottom-up: callees before callers)
Implementations§
Source§impl CallGraph
impl CallGraph
Sourcepub fn from_mir_package(package: &MirPackage) -> Result<Self>
pub fn from_mir_package(package: &MirPackage) -> Result<Self>
Construct a call graph from a MIR package
Sourcepub fn get_analysis_order(&self) -> &[String]
pub fn get_analysis_order(&self) -> &[String]
Get the analysis order (bottom-up: callees before callers)
Sourcepub fn get_node(&self, function_name: &str) -> Option<&CallGraphNode>
pub fn get_node(&self, function_name: &str) -> Option<&CallGraphNode>
Get a node by function name
Sourcepub fn get_node_mut(
&mut self,
function_name: &str,
) -> Option<&mut CallGraphNode>
pub fn get_node_mut( &mut self, function_name: &str, ) -> Option<&mut CallGraphNode>
Get a mutable node by function name
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CallGraph
impl RefUnwindSafe for CallGraph
impl Send for CallGraph
impl Sync for CallGraph
impl Unpin for CallGraph
impl UnsafeUnpin for CallGraph
impl UnwindSafe for CallGraph
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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