pub struct App {Show 18 fields
pub settings: AppSettings,
pub graph_state: GraphViewState,
pub commit_state: CommitViewState,
pub diff_state: DiffViewState,
pub models_state: Option<ModelListState>,
pub title: String,
pub repo_name: String,
pub active_view: ActiveView,
pub prev_active_view: Option<ActiveView>,
pub curr_branches: Vec<(Option<String>, Option<Oid>)>,
pub is_fullscreen: bool,
pub horizontal_split: bool,
pub show_branches: bool,
pub color: bool,
pub models_path: PathBuf,
pub error_message: Option<String>,
pub diff_options: DiffOptions,
pub search_term: Option<String>,
}
Fields§
§settings: AppSettings
§graph_state: GraphViewState
§commit_state: CommitViewState
§diff_state: DiffViewState
§models_state: Option<ModelListState>
§title: String
§repo_name: String
§active_view: ActiveView
§prev_active_view: Option<ActiveView>
§curr_branches: Vec<(Option<String>, Option<Oid>)>
§is_fullscreen: bool
§horizontal_split: bool
§show_branches: bool
§color: bool
§models_path: PathBuf
§error_message: Option<String>
§diff_options: DiffOptions
§search_term: Option<String>
Implementations§
Source§impl App
impl App
pub fn new( settings: AppSettings, title: String, repo_name: String, models_path: PathBuf, ) -> App
pub fn with_graph( self, graph: GitGraph, graph_lines: Vec<String>, text_lines: Vec<String>, indices: Vec<usize>, select_head: bool, ) -> Result<App, String>
pub fn with_branches(self, branches: Vec<(Option<String>, Option<Oid>)>) -> App
pub fn with_color(self, color: bool) -> App
pub fn clear_graph(self) -> App
pub fn reload( self, settings: &Settings, max_commits: Option<usize>, ) -> Result<App, String>
pub fn on_up( &mut self, is_shift: bool, is_ctrl: bool, ) -> Result<(bool, bool), String>
pub fn on_down( &mut self, is_shift: bool, is_ctrl: bool, ) -> Result<(bool, bool), String>
pub fn on_home(&mut self) -> Result<bool, String>
pub fn on_end(&mut self) -> Result<bool, String>
pub fn on_right( &mut self, is_shift: bool, is_ctrl: bool, ) -> Result<bool, String>
pub fn on_left(&mut self, is_shift: bool, is_ctrl: bool)
pub fn on_enter(&mut self, is_control: bool) -> Result<bool, String>
pub fn on_backspace(&mut self) -> Result<bool, String>
pub fn on_plus(&mut self) -> Result<bool, String>
pub fn on_minus(&mut self) -> Result<bool, String>
pub fn on_tab(&mut self)
pub fn on_esc(&mut self) -> Result<bool, String>
pub fn character_entered(&mut self, c: char)
pub fn open_search(&mut self)
pub fn exit_search(&mut self, _abort: bool)
pub fn search(&mut self) -> Result<bool, String>
pub fn set_diff_mode(&mut self, mode: DiffMode) -> Result<bool, String>
pub fn toggle_line_numbers(&mut self) -> Result<bool, String>
pub fn toggle_line_wrap(&mut self) -> Result<bool, String>
pub fn toggle_syntax_highlight(&mut self) -> Result<bool, String>
pub fn toggle_layout(&mut self)
pub fn toggle_branches(&mut self)
pub fn show_help(&mut self)
pub fn select_model(&mut self) -> Result<(), String>
pub fn selection_changed(&mut self) -> Result<(), String>
pub fn reload_diff_message(&mut self) -> Result<(), String>
pub fn reload_diff_files(&mut self) -> Result<bool, String>
pub fn clear_file_diff(&mut self)
pub fn file_changed(&mut self, reset_scroll: bool) -> Result<(), String>
pub fn set_error(&mut self, msg: String)
pub fn clear_error(&mut self)
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