[][src]Struct broot::browser::BrowserState

pub struct BrowserState {
    pub tree: Tree,
    pub filtered_tree: Option<Tree>,
    pub pending_pattern: Pattern,
    pub total_search_required: bool,
}

An application state dedicated to displaying a tree. It's the first and main screen of broot.

Fields

tree: Treefiltered_tree: Option<Tree>pending_pattern: Patterntotal_search_required: bool

Implementations

impl BrowserState[src]

pub fn new(
    path: PathBuf,
    options: TreeOptions,
    screen: &Screen,
    dam: &Dam
) -> Result<Option<BrowserState>, TreeBuildError>
[src]

pub fn with_new_options(
    &self,
    screen: &Screen,
    change_options: &dyn Fn(&mut TreeOptions)
) -> AppStateCmdResult
[src]

pub fn page_height(screen: &Screen) -> i32[src]

pub fn displayed_tree(&self) -> &Tree[src]

return a reference to the currently displayed tree, which is the filtered tree if there's one, the base tree if not.

pub fn displayed_tree_mut(&mut self) -> &mut Tree[src]

return a mutable reference to the currently displayed tree, which is the filtered tree if there's one, the base tree if not.

pub fn open_selection_stay_in_broot(
    &mut self,
    screen: &mut Screen,
    _con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
[src]

pub fn open_selection_quit_broot(
    &mut self,
    screen: &mut Screen,
    con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
[src]

pub fn go_to_parent(&mut self, screen: &mut Screen) -> AppStateCmdResult[src]

Trait Implementations

impl AppState for BrowserState[src]

fn do_pending_task(&mut self, screen: &mut Screen, dam: &mut Dam)[src]

do some work, totally or partially, if there's some to do. Stop as soon as the dam asks for interruption

fn write_flags(
    &self,
    w: &mut dyn Write,
    screen: &mut Screen,
    _con: &AppContext
) -> Result<(), ProgramError>
[src]

draw the flags at the bottom right of the screen

impl VerbExecutor for BrowserState[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, 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.