Struct App

Source
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

Source

pub fn new( settings: AppSettings, title: String, repo_name: String, models_path: PathBuf, ) -> App

Source

pub fn with_graph( self, graph: GitGraph, graph_lines: Vec<String>, text_lines: Vec<String>, indices: Vec<usize>, select_head: bool, ) -> Result<App, String>

Source

pub fn with_branches(self, branches: Vec<(Option<String>, Option<Oid>)>) -> App

Source

pub fn with_color(self, color: bool) -> App

Source

pub fn clear_graph(self) -> App

Source

pub fn reload( self, settings: &Settings, max_commits: Option<usize>, ) -> Result<App, String>

Source

pub fn on_up( &mut self, is_shift: bool, is_ctrl: bool, ) -> Result<(bool, bool), String>

Source

pub fn on_down( &mut self, is_shift: bool, is_ctrl: bool, ) -> Result<(bool, bool), String>

Source

pub fn on_home(&mut self) -> Result<bool, String>

Source

pub fn on_end(&mut self) -> Result<bool, String>

Source

pub fn on_right( &mut self, is_shift: bool, is_ctrl: bool, ) -> Result<bool, String>

Source

pub fn on_left(&mut self, is_shift: bool, is_ctrl: bool)

Source

pub fn on_enter(&mut self, is_control: bool) -> Result<bool, String>

Source

pub fn on_backspace(&mut self) -> Result<bool, String>

Source

pub fn on_plus(&mut self) -> Result<bool, String>

Source

pub fn on_minus(&mut self) -> Result<bool, String>

Source

pub fn on_tab(&mut self)

Source

pub fn on_esc(&mut self) -> Result<bool, String>

Source

pub fn character_entered(&mut self, c: char)

Source

pub fn search(&mut self) -> Result<bool, String>

Source

pub fn set_diff_mode(&mut self, mode: DiffMode) -> Result<bool, String>

Source

pub fn toggle_line_numbers(&mut self) -> Result<bool, String>

Source

pub fn toggle_line_wrap(&mut self) -> Result<bool, String>

Source

pub fn toggle_syntax_highlight(&mut self) -> Result<bool, String>

Source

pub fn toggle_layout(&mut self)

Source

pub fn toggle_branches(&mut self)

Source

pub fn show_help(&mut self)

Source

pub fn select_model(&mut self) -> Result<(), String>

Source

pub fn selection_changed(&mut self) -> Result<(), String>

Source

pub fn reload_diff_message(&mut self) -> Result<(), String>

Source

pub fn reload_diff_files(&mut self) -> Result<bool, String>

Source

pub fn clear_file_diff(&mut self)

Source

pub fn file_changed(&mut self, reset_scroll: bool) -> Result<(), String>

Source

pub fn set_error(&mut self, msg: String)

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T