Skip to main content

call_tree

Function call_tree 

Source
pub fn call_tree(
    focus: &str,
    relations: &[CallRelation],
    depth: usize,
    limit: usize,
) -> CallTree
Expand description

Build the layered tree a focus reaches inside a hop and node budget. 构建焦点在跳数与节点预算内到达的分层树。

depth counts hops outwards and limit counts nodes including the focus; a limit of zero is treated as one, so the focus is always present and callers can rely on nodes[0]. depth 是向外的跳数,limit 是包含焦点在内的节点数;limit 为零时按一处理, 因此焦点始终存在,调用方可依赖 nodes[0]。