pub struct App { /* private fields */ }Expand description
The main application struct, will hold the state of the application.
Implementations§
Source§impl App
impl App
Sourcepub fn try_new(mode: ListMode, directory_index: DirectoryIndex) -> Result<Self>
pub fn try_new(mode: ListMode, directory_index: DirectoryIndex) -> Result<Self>
Tries to create a new instance of the application in a given list mode.
Sourcepub fn change_directory<T: AsRef<Path>>(&mut self, path: T) -> Result<()>
pub fn change_directory<T: AsRef<Path>>(&mut self, path: T) -> Result<()>
Changes the current directory and sorts the entries in the new directory.
pub fn change_to_frecent(&mut self) -> Result<()>
Sourcepub fn run<B: Backend>(&mut self, terminal: &mut Terminal<B>) -> Result<PathBuf>
pub fn run<B: Backend>(&mut self, terminal: &mut Terminal<B>) -> Result<PathBuf>
Runs the application’s main loop until the user quits.
Sourcepub fn handle_key_event(
&mut self,
key: KeyEvent,
modifiers: KeyModifiers,
) -> Result<()>
pub fn handle_key_event( &mut self, key: KeyEvent, modifiers: KeyModifiers, ) -> Result<()>
Handles a key event with the given key and modifiers, it will perform the appropriate action based on the current input mode and registered hotkeys.
pub fn get_sub_header_title(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for App
impl RefUnwindSafe for App
impl Send for App
impl Sync for App
impl Unpin for App
impl UnwindSafe for App
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more