pub struct TreeNode {Show 13 fields
pub path: PathBuf,
pub name: String,
pub kind: EntryKind,
pub entry_ignored: Option<bool>,
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 omissions: Vec<TreeOmission>,
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.
entry_ignored: Option<bool>Whether this entry itself is gitignored, or None when its classification is unknown.
This is independent of the selected subtree’s ignored tally.
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
governing controls were unobserved or could not be verified.
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.
omissions: Vec<TreeOmission>Disjoint child subtrees first excluded at this node’s display boundary.
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.