Struct broot::tree::Tree [−][src]
pub struct Tree {
pub lines: Box<[TreeLine]>,
pub selection: usize,
pub options: TreeOptions,
pub scroll: usize,
pub nb_gitignored: u32,
pub total_search: bool,
pub git_status: ComputationResult<TreeGitStatus>,
}
Expand description
The tree which may be displayed, with onle line per visible line of the panel.
In the tree structure, every “node” is just a line, there’s no link from a child to its parent or from a parent to its children.
Fields
lines: Box<[TreeLine]>
selection: usize
options: TreeOptions
scroll: usize
nb_gitignored: u32
total_search: bool
git_status: ComputationResult<TreeGitStatus>
Implementations
rebuild the tree with the same root, height, and options
do what must be done after line additions or removals:
- sort the lines
- compute left branchs
select another line
For example the following one if dy is 1.
Scroll the desired amount and return true, or return false if it’s already at end or the tree fits the page
try to select a line by index of visible line (works if y+scroll falls on a selectable line)
select the line with the best matching score
return true when we could select the given path
fetch the file_sums of regular files (thus avoiding the long computation which is needed for directories)
compute the file_sum of one directory
To compute the size of all of them, this should be called until has_dir_missing_sum returns false
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Tree
impl UnwindSafe for Tree
Blanket Implementations
Mutably borrows from an owned value. Read more