pub struct TreeRow {
pub identity: ProcessIdentity,
pub process_index: usize,
pub depth: u32,
pub parent_row: Option<usize>,
pub descendants: u32,
pub is_last_child: bool,
pub parent_link_cut: bool,
}Expand description
One row of a rendered process tree.
Fields§
§identity: ProcessIdentityThe stable identity of the process on this row (§26).
process_index: usizeIndex of the process in the slice the tree was built from.
Rows are indices rather than clones because a published snapshot is shared
behind an Arc and must not be duplicated per tick (§10.4, §16.1).
depth: u32Indentation level: 0 for a root.
u32 rather than u16 so a pathological chain cannot wrap; it saturates
instead.
parent_row: Option<usize>Row index of this row’s parent, always smaller than this row’s own index.
descendants: u32Total descendants, direct and indirect (§2.4).
is_last_child: boolWhether this row is the last of its sibling group.
Selects `- over +- when rendering, and for a depth-0 row refers
to the group of roots.
parent_link_cut: boolWhether this row’s parent link was cut to break a cycle.
A missing parent does not set this: it is ordinary and expected, whereas a cut link means the OS reported something impossible and the placement of this subtree is our decision rather than the kernel’s.