[][src]Struct broot::tree::Tree

pub struct Tree {
    pub lines: Box<[TreeLine]>,
    pub selection: usize,
    pub options: TreeOptions,
    pub scroll: i32,
    pub nb_gitignored: u32,
    pub total_search: bool,
    pub git_status: ComputationResult<TreeGitStatus>,
}

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: usizeoptions: TreeOptionsscroll: i32nb_gitignored: u32total_search: boolgit_status: ComputationResult<TreeGitStatus>

Implementations

impl Tree[src]

pub fn refresh(
    &mut self,
    page_height: usize,
    con: &AppContext
) -> Result<(), TreeBuildError>
[src]

rebuild the tree with the same root, height, and options

pub fn after_lines_changed(&mut self)[src]

do what must be done after line additions or removals:

  • sort the lines
  • compute left branchs

pub fn has_branch(&self, line_index: usize, depth: usize) -> bool[src]

pub fn move_selection(&mut self, dy: i32, page_height: i32)[src]

select another line

For example the following one if dy is 1.

pub fn try_scroll(&mut self, dy: i32, page_height: i32)[src]

pub fn try_select_y(&mut self, y: i32) -> bool[src]

try to select a line (works if y+scroll falls on a selectable line)

pub fn make_selection_visible(&mut self, page_height: i32)[src]

pub fn selected_line(&self) -> &TreeLine[src]

pub fn root(&self) -> &PathBuf[src]

pub fn try_select_best_match(&mut self)[src]

select the line with the best matching score

pub fn try_select_path(&mut self, path: &Path) -> bool[src]

return true when we could select the given path

pub fn try_select_first(&mut self) -> bool[src]

pub fn try_select_last(&mut self, page_height: i32) -> bool[src]

pub fn try_select_next_match(&mut self) -> bool[src]

pub fn try_select_previous_same_depth(&mut self) -> bool[src]

pub fn try_select_next_same_depth(&mut self) -> bool[src]

pub fn try_select_previous_match(&mut self) -> bool[src]

pub fn has_dir_missing_sum(&self) -> bool[src]

pub fn is_missing_git_status_computation(&self) -> bool[src]

pub fn fetch_regular_file_sums(&mut self)[src]

fetch the file_sums of regular files (thus avoiding the long computation which is needed for directories)

pub fn fetch_some_missing_dir_sum(&mut self, dam: &Dam)[src]

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

pub fn total_sum(&self) -> FileSum[src]

compute and return the size of the root

pub fn visible_cols(&self) -> Vec<Col>[src]

compute the ordered list of columns that should be displayed for current tree state and options

Trait Implementations

impl Clone for Tree[src]

impl Debug for Tree[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,