pub struct CallGraph { /* private fields */ }Expand description
A graph view built from logical runtime edges. 从运行时逻辑边构建的图视图。
Implementations§
Source§impl CallGraph
impl CallGraph
Sourcepub fn from_trace(trace: &CallTrace) -> Self
pub fn from_trace(trace: &CallTrace) -> Self
Build a graph without copying full call paths or local values. 构建图时不复制完整调用路径或局部值。
Sourcepub fn from_relations(relations: &[CallRelation]) -> Self
pub fn from_relations(relations: &[CallRelation]) -> Self
Build the same graph from merged MIR/live relations. 从合并后的 MIR/实时关系构建同一图后端。
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
Number of distinct logical functions currently in the graph; parallel invocations never add a second node. 图中当前不同逻辑函数的数量;同一次调用的多次执行不会新增第二个节点。
Sourcepub fn edge_count(&self) -> usize
pub fn edge_count(&self) -> usize
Number of distinct logical edges in the graph; repeated invocations between the same pair collapse into one edge. 图中不同逻辑边的数量;同一对函数间的多次调用会合并为一条边。
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