Skip to main content

CallTree

Struct CallTree 

Source
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: bool

Whether at least one symbol was dropped because the node budget ran out. 是否至少有一个符号因为节点预算用尽而被丢弃。

Implementations§

Source§

impl CallTree

Source

pub fn rows(&self) -> usize

Rows the drawing needs, i.e. the highest lane in use plus one. 绘制所需行数,即使用中的最大车道加一。

Source

pub fn level_span(&self) -> (i32, i32)

Lowest and highest level in use, i.e. the columns the drawing needs. 使用中的最低与最高层,即绘制所需的列范围。

Source

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. 匹配某个符号的节点下标;匹配规则与内核别处一致:裸名可匹配限定路径的后缀。

Source

pub fn backward_edges(&self) -> usize

Forced edges, i.e. the relations the axis could not draw left to right. 反向边,即无法沿轴从左到右画出的那些关系。

Trait Implementations§

Source§

impl Clone for CallTree

Source§

fn clone(&self) -> CallTree

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CallTree

Source§

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

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

impl Default for CallTree

Source§

fn default() -> CallTree

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

impl Eq for CallTree

Source§

impl PartialEq for CallTree

Source§

fn eq(&self, other: &CallTree) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for CallTree

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.