[][src]Struct broot::flat_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>,
}

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) -> Result<(), TreeBuildError>[src]

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]

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) -> bool[src]

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

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

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

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

pub fn fetch_file_sizes(&mut self)[src]

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

compute the size of one directory

To compute the size of all of them, this should be called until has_dir_missing_size returns false

pub fn total_size(&self) -> FileSize[src]

compute and return the size of the root

Trait Implementations

impl Clone for Tree[src]

impl Debug for Tree[src]

Auto Trait Implementations

impl !RefUnwindSafe for Tree

impl Send for Tree

impl Sync for Tree

impl Unpin for Tree

impl UnwindSafe for Tree

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> 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.