pub struct AppOptions {
pub left_dir: PathBuf,
pub right_dir: PathBuf,
pub extensions: Vec<String>,
pub show_hidden: bool,
pub theme_idx: usize,
pub show_theme_panel: bool,
pub single_pane: bool,
pub sort_mode: SortMode,
pub cd_on_exit: bool,
pub editor: Editor,
pub verbose: bool,
pub startup_log: Vec<String>,
}Expand description
Startup configuration passed to App::new.
Grouping all constructor parameters into a single struct keeps the call
sites readable and avoids the clippy::too_many_arguments limit.
§Example
let app = App::new(AppOptions {
left_dir: PathBuf::from("/home/user"),
right_dir: PathBuf::from("/tmp"),
..AppOptions::default()
});Fields§
§left_dir: PathBufStarting directory for the left pane.
right_dir: PathBufStarting directory for the right pane.
extensions: Vec<String>File-extension filter (empty = show all).
Show hidden (dot-prefixed) entries on startup.
theme_idx: usizeIndex into the theme catalogue to use on startup.
show_theme_panel: boolWhether the theme-picker side-panel should be open on startup.
single_pane: boolWhether to start in single-pane mode.
sort_mode: SortModeActive sort mode.
cd_on_exit: boolWhether cd-on-exit is enabled.
editor: EditorWhich editor to open when the user presses e on a file.
verbose: boolWhen true, show a debug log panel in the TUI and write logs to a
file. Activated by --verbose / -v.
startup_log: Vec<String>Pre-App log lines collected during startup (before the App existed).
These are drained into App::debug_log on construction.
Trait Implementations§
Source§impl Clone for AppOptions
impl Clone for AppOptions
Source§fn clone(&self) -> AppOptions
fn clone(&self) -> AppOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AppOptions
impl Debug for AppOptions
Auto Trait Implementations§
impl Freeze for AppOptions
impl RefUnwindSafe for AppOptions
impl Send for AppOptions
impl Sync for AppOptions
impl Unpin for AppOptions
impl UnsafeUnpin for AppOptions
impl UnwindSafe for AppOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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