pub enum KeyAction {
Show 25 variants
NavigateUp,
NavigateDown,
PageUp,
PageDown,
GoToTop,
GoToBottom,
FocusNextPane,
FocusPrevPane,
Switch,
Filter,
ClearFilter,
New,
Remove,
PrCheckout,
Checkout,
Sync,
OpenEditor,
Refresh,
SortCycle,
SortReverse,
Help,
Quit,
ToggleSidebar,
ResizeSidebarGrow,
ResizeSidebarShrink,
}Expand description
A TUI action that can be bound to a key (spec §10/§11). The 24 variants match
the action names accepted by ui.keybindings.
Variants§
Move the selection up.
Move the selection down.
PageUp
Scroll up one page.
PageDown
Scroll down one page.
GoToTop
Jump to the first row.
GoToBottom
Jump to the last row.
FocusNextPane
Focus the next pane.
FocusPrevPane
Focus the previous pane.
Switch
Switch to the selected worktree (print path, exit).
Filter
Enter filter mode.
ClearFilter
Clear the filter / dismiss an overlay.
New
Open the create-worktree prompt.
Remove
Open the confirm-remove dialog.
PrCheckout
Open the PR picker.
Checkout
Check out a branch in the selected worktree (syncs with origin).
Sync
Sync (pull then push) the selected worktree’s branch.
OpenEditor
Open the selected worktree in the editor.
Refresh
Force a full async refresh.
SortCycle
Cycle the sort field.
SortReverse
Toggle the sort direction.
Help
Show the help overlay.
Quit
Quit without switching.
ToggleSidebar
Toggle the list pane (full-screen detail).
ResizeSidebarGrow
Grow the list pane width.
ResizeSidebarShrink
Shrink the list pane width.
Implementations§
Source§impl KeyAction
impl KeyAction
Sourcepub fn label(self) -> &'static str
pub fn label(self) -> &'static str
A short human label for the status bar and help overlay (e.g. switch,
new, checkout). The match is exhaustive, so a new KeyAction
variant cannot be added without giving it a label — this is what keeps
the on-screen hints and help from drifting away from the key bindings
(issue #39).
Trait Implementations§
impl Copy for KeyAction
impl Eq for KeyAction
impl StructuralPartialEq for KeyAction
Auto Trait Implementations§
impl Freeze for KeyAction
impl RefUnwindSafe for KeyAction
impl Send for KeyAction
impl Sync for KeyAction
impl Unpin for KeyAction
impl UnsafeUnpin for KeyAction
impl UnwindSafe for KeyAction
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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