pub struct CallTree {
pub nodes: Vec<CallTreeNode>,
pub edges: Vec<CallTreeEdge>,
pub truncated: bool,
}Expand description
A focus and every symbol it reaches inside the budgets. 一个焦点,以及它在预算内能到达的全部符号。
nodes[0] is always the focus; the rest follow in placement order, which is
breadth-first over the hops, so a caller that owns a raw index also owns a
stable cursor order.
nodes[0] 始终是焦点;其余按放置顺序排列,即按跳数广度优先。因此持有裸下标的调用方
也就持有一份稳定的游标顺序。
Fields§
§nodes: Vec<CallTreeNode>Placed nodes, focus first. 已放置的节点,焦点在首位。
edges: Vec<CallTreeEdge>Every relation whose two ends are both placed. 两端都已放置的全部关系。
truncated: boolWhether at least one symbol was dropped because the node budget ran out. 是否至少有一个符号因为节点预算用尽而被丢弃。
Implementations§
Source§impl CallTree
impl CallTree
Sourcepub fn rows(&self) -> usize
pub fn rows(&self) -> usize
Rows the drawing needs, i.e. the highest lane in use plus one. 绘制所需行数,即使用中的最大车道加一。
Sourcepub fn level_span(&self) -> (i32, i32)
pub fn level_span(&self) -> (i32, i32)
Lowest and highest level in use, i.e. the columns the drawing needs. 使用中的最低与最高层,即绘制所需的列范围。
Sourcepub fn index_of(&self, symbol: &str) -> Option<usize>
pub fn index_of(&self, symbol: &str) -> Option<usize>
Index of the placed node matching a symbol, as the kernel matches symbols elsewhere: a bare name matches a qualified path suffix. 匹配某个符号的节点下标;匹配规则与内核别处一致:裸名可匹配限定路径的后缀。
Sourcepub fn backward_edges(&self) -> usize
pub fn backward_edges(&self) -> usize
Forced edges, i.e. the relations the axis could not draw left to right. 反向边,即无法沿轴从左到右画出的那些关系。