pub struct App {Show 20 fields
pub rows: Vec<LogRow>,
pub view: Vec<usize>,
pub marks: Vec<Vec<Vec<usize>>>,
pub sel: usize,
pub scroll: usize,
pub loading: bool,
pub filters: Filters,
pub search: String,
pub focus: Focus,
pub files: Option<(String, Vec<FileEntry>)>,
pub file_sel: usize,
pub file_scroll: usize,
pub diff: Option<Diff>,
pub overlay: Overlay,
pub status: Option<(String, bool)>,
pub head: String,
pub remotes: Vec<String>,
pub now: i64,
pub width: u16,
pub height: u16,
/* private fields */
}Fields§
§rows: Vec<LogRow>§view: Vec<usize>Indices into rows currently shown.
marks: Vec<Vec<Vec<usize>>>Search match positions per shown row: [short hash, author, subject, refs].
sel: usize§scroll: usize§loading: bool§filters: Filters§search: String§focus: Focus§files: Option<(String, Vec<FileEntry>)>§file_sel: usize§file_scroll: usize§diff: Option<Diff>§overlay: Overlay§status: Option<(String, bool)>(message, is_error)
head: StringHeader label for HEAD: branch name or detached at <sha>.
remotes: Vec<String>§now: i64Unix time used for relative ages.
width: u16§height: u16Implementations§
Source§impl App
impl App
pub fn new( filters: Filters, head: String, remotes: Vec<String>, now: i64, ) -> Self
pub fn resize(&mut self, w: u16, h: u16)
Sourcepub fn body_height(&self) -> usize
pub fn body_height(&self) -> usize
Rows available for the commit list / sidebar / diff.
Sourcepub fn begin_load(&mut self)
pub fn begin_load(&mut self)
Starts a fresh load (after a filter change); keeps the selected commit if it reappears.
pub fn push_rows(&mut self, rows: Vec<LogRow>)
pub fn finish_load(&mut self)
pub fn selected_hash(&self) -> Option<&str>
pub fn selected_short(&self) -> Option<&str>
pub fn set_search(&mut self, q: &str)
pub fn set_files(&mut self, sha: String, files: Vec<FileEntry>)
Sourcepub fn files_wanted(&self) -> Option<&str>
pub fn files_wanted(&self) -> Option<&str>
The selected commit’s file list is missing or stale.
pub fn set_diff(&mut self, sha: String, path: String, lines: Vec<String>)
pub fn open_branches(&mut self, names: Vec<String>)
pub fn date_error(&mut self, msg: String)
Sourcepub fn apply_date(&mut self, since: String, until: String)
pub fn apply_date(&mut self, since: String, until: String)
Valid dates: apply them. Caller then reloads.
pub fn confirm_reset( &mut self, mode: ResetMode, sha: String, branch: String, at_risk: Vec<String>, )
Sourcepub fn action_result(&mut self, ok: bool, msg: String)
pub fn action_result(&mut self, ok: bool, msg: String)
Result of a git action. Name modals stay open on error.
pub fn key(&mut self, k: KeyEvent) -> Effect
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
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