Skip to main content

CallGraph

Struct CallGraph 

Source
pub struct CallGraph { /* private fields */ }
Expand description

A graph view built from logical runtime edges. 从运行时逻辑边构建的图视图。

Implementations§

Source§

impl CallGraph

Source

pub fn from_trace(trace: &CallTrace) -> Self

Build a graph without copying full call paths or local values. 构建图时不复制完整调用路径或局部值。

Source

pub fn from_relations(relations: &[CallRelation]) -> Self

Build the same graph from merged MIR/live relations. 从合并后的 MIR/实时关系构建同一图后端。

Source

pub fn node_count(&self) -> usize

Number of distinct logical functions currently in the graph; parallel invocations never add a second node. 图中当前不同逻辑函数的数量;同一次调用的多次执行不会新增第二个节点。

Source

pub fn edge_count(&self) -> usize

Number of distinct logical edges in the graph; repeated invocations between the same pair collapse into one edge. 图中不同逻辑边的数量;同一对函数间的多次调用会合并为一条边。

Source

pub fn to_dot(&self) -> String

Export a compact DOT representation for TUI or external graph tools. 导出紧凑 DOT 表示,供 TUI 或外部图工具使用。

Trait Implementations§

Source§

impl Debug for CallGraph

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CallGraph

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more