pub struct TreeNode {
pub path: PathBuf,
pub name: String,
pub kind: EntryKind,
pub bytes: u64,
pub allocated: u64,
pub files: u64,
pub dirs: u64,
pub ignored: Option<IgnoredTally>,
pub newest_mtime_ns: Option<i64>,
pub children: Vec<TreeNode>,
pub truncated: bool,
}Expand description
One directory’s row in a tree view.
Fields§
§path: PathBufPath relative to the index root; empty for the root itself.
name: StringFinal path component, or . for the root.
kind: EntryKindWhat the entry is.
bytes: u64Apparent bytes in this subtree.
allocated: u64Allocated bytes in this subtree.
files: u64Files in this subtree.
dirs: u64Directories in this subtree.
ignored: Option<IgnoredTally>The part of this subtree’s tallies that .gitignore rules ignore, or None when
the index observed no control state.
Counted over the selected entries, like every other tally on the row, so it is zero when the selection excludes ignored entries and the whole row when it admits only them.
newest_mtime_ns: Option<i64>Newest modification time in this subtree, when it holds any files.
children: Vec<TreeNode>Children reported beneath this node.
truncated: boolWhether children were withheld by the depth or limit bound.
Trait Implementations§
Source§impl Drop for TreeNode
impl Drop for TreeNode
Source§fn drop(&mut self)
fn drop(&mut self)
Release children iteratively.
The derived drop glue recurses once per level, so a deeply nested tree would exhaust the stack on release even after every renderer was made iterative — the same hazard the index avoids when freeing a subtree. Taking the children out first turns that recursion into a loop.