[−][src]Struct broot::browser::BrowserState
An application state dedicated to displaying a tree. It's the first and main screen of broot.
Fields
tree: Tree
filtered_tree: Option<Tree>
pending_pattern: Pattern
total_search_required: bool
Implementations
impl BrowserState
[src]
pub fn new(
path: PathBuf,
options: TreeOptions,
screen: &Screen,
dam: &Dam
) -> Result<Option<BrowserState>, TreeBuildError>
[src]
path: PathBuf,
options: TreeOptions,
screen: &Screen,
dam: &Dam
) -> Result<Option<BrowserState>, TreeBuildError>
pub fn with_new_options(
&self,
screen: &Screen,
change_options: &dyn Fn(&mut TreeOptions)
) -> AppStateCmdResult
[src]
&self,
screen: &Screen,
change_options: &dyn Fn(&mut TreeOptions)
) -> AppStateCmdResult
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]
&mut self,
screen: &mut Screen,
_con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
pub fn open_selection_quit_broot(
&mut self,
screen: &mut Screen,
con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
[src]
&mut self,
screen: &mut Screen,
con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
pub fn go_to_parent(&mut self, screen: &mut Screen) -> AppStateCmdResult
[src]
Trait Implementations
impl AppState for BrowserState
[src]
fn has_pending_task(&self) -> bool
[src]
fn write_status(
&self,
w: &mut dyn Write,
cmd: &Command,
screen: &Screen,
con: &AppContext
) -> Result<(), ProgramError>
[src]
&self,
w: &mut dyn Write,
cmd: &Command,
screen: &Screen,
con: &AppContext
) -> Result<(), ProgramError>
fn can_execute(&self, verb_index: usize, con: &AppContext) -> bool
[src]
fn apply(
&mut self,
cmd: &mut Command,
screen: &mut Screen,
con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
[src]
&mut self,
cmd: &mut Command,
screen: &mut Screen,
con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
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 display(
&mut self,
w: &mut dyn Write,
screen: &Screen,
_con: &AppContext
) -> Result<(), ProgramError>
[src]
&mut self,
w: &mut dyn Write,
screen: &Screen,
_con: &AppContext
) -> Result<(), ProgramError>
fn refresh(&mut self, screen: &Screen, _con: &AppContext) -> Command
[src]
fn write_flags(
&self,
w: &mut dyn Write,
screen: &mut Screen,
_con: &AppContext
) -> Result<(), ProgramError>
[src]
&self,
w: &mut dyn Write,
screen: &mut Screen,
_con: &AppContext
) -> Result<(), ProgramError>
draw the flags at the bottom right of the screen
impl VerbExecutor for BrowserState
[src]
fn execute_verb(
&mut self,
verb: &Verb,
invocation: &VerbInvocation,
screen: &mut Screen,
con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
[src]
&mut self,
verb: &Verb,
invocation: &VerbInvocation,
screen: &mut Screen,
con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>
Auto Trait Implementations
impl !RefUnwindSafe for BrowserState
impl Send for BrowserState
impl Sync for BrowserState
impl Unpin for BrowserState
impl UnwindSafe for BrowserState
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,