pub enum AppMode {
CommitList,
CommitDetail,
SplitSelect {
strategy_index: usize,
},
SplitConfirm(PendingSplit),
DropConfirm(PendingDrop),
RebaseConflict(Box<ConflictState>),
SquashSelect {
source_index: usize,
is_fixup: bool,
},
MoveSelect {
source_index: usize,
insert_before: usize,
},
Help(Box<AppMode>),
}Expand description
Application display mode.
Variants§
CommitList
Commit list view with fragmap.
CommitDetail
Detailed view of a single commit.
SplitSelect
Split strategy selection dialog; carries the highlighted option index.
SplitConfirm(PendingSplit)
Confirmation dialog for large splits (> SPLIT_CONFIRM_THRESHOLD commits).
DropConfirm(PendingDrop)
Confirmation dialog before dropping a commit.
RebaseConflict(Box<ConflictState>)
Waiting for the user to resolve merge conflicts that arose during a rebase operation. Enter continues, Esc aborts the entire operation.
SquashSelect
Squash/fixup target selection: user picks which commit to squash the source into.
When is_fixup is true the target’s message is kept as-is (no editor).
MoveSelect
Move commit selection: user picks where to insert the source commit.
insert_before is the index in the commit list where the separator row
appears; the commit will be moved to that position.
Help(Box<AppMode>)
Help dialog overlay; carries the mode to return to when closed.
Implementations§
Source§impl AppMode
impl AppMode
Sourcepub fn background(&self) -> Option<AppMode>
pub fn background(&self) -> Option<AppMode>
For overlay modes, return the base view that should be rendered
underneath. Returns None for base views (CommitList, CommitDetail).
Sourcepub fn parse_key(&self, event: Event) -> KeyCommand
pub fn parse_key(&self, event: Event) -> KeyCommand
Parse a terminal event into a semantic key command for this mode.
Most keys are mode-independent (arrows, Esc, Enter). Where a key has different meanings per mode (e.g. ‘m’ → Move in CommitList vs Mergetool in RebaseConflict), this method resolves the ambiguity.
Trait Implementations§
impl Eq for AppMode
impl StructuralPartialEq for AppMode
Auto Trait Implementations§
impl Freeze for AppMode
impl RefUnwindSafe for AppMode
impl Send for AppMode
impl Sync for AppMode
impl Unpin for AppMode
impl UnsafeUnpin for AppMode
impl UnwindSafe for AppMode
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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