pub struct App {Show 23 fields
pub should_quit: bool,
pub screen: AppScreen,
pub active_pane: ActivePane,
pub input_mode: InputMode,
pub input_purpose: InputPurpose,
pub tick_count: u64,
pub bg_rx: Receiver<BackgroundResult>,
pub input_buffer: String,
pub show_theme_panel: bool,
pub show_options_panel: bool,
pub editor: Editor,
pub show_editor_panel: bool,
pub editor_list_state: ListState,
pub current_theme_index: usize,
pub theme_list_state: ListState,
pub recent_repos: Vec<RepoHistoryEntry>,
pub browser_dir: PathBuf,
pub browser_entries: Vec<PathBuf>,
pub browser_list_state: ListState,
pub browser_return_screen: AppScreen,
pub tabs: Vec<RepoTab>,
pub active_tab_index: usize,
pub last_auto_refresh: Instant,
/* private fields */
}Fields§
§should_quit: bool§screen: AppScreen§active_pane: ActivePane§input_mode: InputMode§input_purpose: InputPurpose§tick_count: u64§bg_rx: Receiver<BackgroundResult>Receiver for results from background tasks.
input_buffer: String§show_theme_panel: boolWhether the theme selection panel is visible.
show_options_panel: boolWhether the options panel is visible.
editor: EditorConfigured editor for opening files.
show_editor_panel: boolWhether the editor picker panel is visible.
editor_list_state: ListStateListState for the editor picker list.
current_theme_index: usizeCurrently selected theme index (0-26).
theme_list_state: ListStateListState for the theme list widget.
recent_repos: Vec<RepoHistoryEntry>Recently opened repositories loaded from persistence.
browser_dir: PathBufCurrent directory being browsed in the directory picker.
browser_entries: Vec<PathBuf>Entries in the current browser directory.
browser_list_state: ListStateList state for the directory browser.
browser_return_screen: AppScreenScreen to return to when the directory browser is dismissed.
tabs: Vec<RepoTab>Open repository tabs.
active_tab_index: usizeIndex of the currently active tab.
last_auto_refresh: InstantTimestamp of the last auto-refresh.
Implementations§
Source§impl App
impl App
Source§impl App
impl App
pub fn cycle_theme_next(&mut self)
pub fn cycle_theme_prev(&mut self)
pub fn current_theme_name(&self) -> &'static str
Sourcepub fn save_theme(&self)
pub fn save_theme(&self)
Persist the current theme selection to disk.
Sourcepub fn save_session(&self)
pub fn save_session(&self)
Persist the paths of all open tabs for session restore.
pub fn open_repo(&mut self, path: PathBuf)
pub fn refresh(&mut self)
Sourcepub fn poll_background(&mut self)
pub fn poll_background(&mut self)
Process any pending results from background tasks. Call this once per tick in the event loop.
Sourcepub fn maybe_auto_refresh(&mut self)
pub fn maybe_auto_refresh(&mut self)
Reload only the staging area (unstaged + staged diffs). Check if enough time has passed and trigger a staging refresh.
pub fn refresh_staging(&mut self)
pub fn stage_selected(&mut self)
pub fn unstage_selected(&mut self)
pub fn stage_all(&mut self)
pub fn unstage_all(&mut self)
pub fn discard_selected(&mut self)
Sourcepub fn stage_files(&mut self, paths: Vec<String>)
pub fn stage_files(&mut self, paths: Vec<String>)
Stage multiple files at once.
Sourcepub fn unstage_files(&mut self, paths: Vec<String>)
pub fn unstage_files(&mut self, paths: Vec<String>)
Unstage multiple files at once.
Sourcepub fn discard_files(&mut self, paths: Vec<String>)
pub fn discard_files(&mut self, paths: Vec<String>)
Discard changes for multiple files at once.
pub fn create_commit(&mut self)
pub fn checkout_selected_branch(&mut self)
pub fn create_branch(&mut self)
pub fn delete_selected_branch(&mut self)
pub fn stash_save(&mut self)
pub fn stash_pop_selected(&mut self)
pub fn stash_drop_selected(&mut self)
Sourcepub fn load_commit_diff(&mut self)
pub fn load_commit_diff(&mut self)
Load the file list for the currently selected commit (phase 1 of two-phase loading).
Sourcepub fn load_single_file_diff(&mut self, file_path: String)
pub fn load_single_file_diff(&mut self, file_path: String)
Load the diff for a single file in the selected commit (phase 2).
Sourcepub fn next_diff_file(&mut self)
pub fn next_diff_file(&mut self)
Switch to the next file in the commit diff list.
Sourcepub fn prev_diff_file(&mut self)
pub fn prev_diff_file(&mut self)
Switch to the previous file in the commit diff list.
Sourcepub fn search_commits(&mut self, query: String)
pub fn search_commits(&mut self, query: String)
Close the current repository and return to the welcome screen. Search commits by query string.
Sourcepub fn load_commit_diff_by_oid(&mut self)
pub fn load_commit_diff_by_oid(&mut self)
Load the diff for a commit by its OID (used by search results).
pub fn close_repo(&mut self)
Sourcepub fn refresh_browser(&mut self)
pub fn refresh_browser(&mut self)
Populate browser_entries with the contents of browser_dir.
Sourcepub fn open_browser(&mut self, start: PathBuf)
pub fn open_browser(&mut self, start: PathBuf)
Open the directory browser starting from a given path.
Sourcepub fn open_selected_in_editor(&mut self)
pub fn open_selected_in_editor(&mut self)
Load the diff for a selected staging file into the diff pane. Open the currently selected staging file in the configured editor.
pub fn load_staging_diff(&mut self)
pub fn fetch_remote(&mut self)
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 UnsafeUnpin 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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