pub struct LogPanel {
pub entries: Vec<LogEntry>,
pub scope: LogScope,
pub selected: usize,
pub scroll: usize,
}Expand description
Fields§
§entries: Vec<LogEntry>Commit rows, most recent first (as git log orders them).
scope: LogScopeWhere these entries came from.
selected: usizeIndex of the highlighted row.
scroll: usizeFirst visible row.
Implementations§
Source§impl LogPanel
impl LogPanel
Sourcepub fn new(entries: Vec<LogEntry>, scope: LogScope) -> Self
pub fn new(entries: Vec<LogEntry>, scope: LogScope) -> Self
A fresh panel over entries, selecting the first (most recent) row.
Sourcepub fn page_down(&mut self, page: usize)
pub fn page_down(&mut self, page: usize)
Move the highlight down one page, stopping at the bottom.
Sourcepub fn ensure_visible(&mut self, height: usize)
pub fn ensure_visible(&mut self, height: usize)
Keep the highlighted row within a window of height visible rows.
Sourcepub fn selected_sha(&self) -> Option<&str>
pub fn selected_sha(&self) -> Option<&str>
The highlighted commit’s full hash, if any.
Sourcepub fn selected_abbrev(&self) -> Option<&str>
pub fn selected_abbrev(&self) -> Option<&str>
The highlighted commit’s abbreviated hash, if any.
Auto Trait Implementations§
impl Freeze for LogPanel
impl RefUnwindSafe for LogPanel
impl Send for LogPanel
impl Sync for LogPanel
impl Unpin for LogPanel
impl UnsafeUnpin for LogPanel
impl UnwindSafe for LogPanel
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