pub enum HistoryEditorOp {
Show 16 variants
CommitsLoaded(Vec<CommitInfo>),
OperationFailed(String),
OperationCompleted {
commits: Vec<CommitInfo>,
pre_sha: Option<String>,
description: String,
},
MoveUp,
MoveDown,
ConfirmMove,
StartReword,
StartSquash {
target_idx: usize,
},
ConfirmEdit,
DeleteCommit,
UndoLast,
EditorInsertChar(char),
EditorInsertNewline,
EditorBackspace,
EditorCursorLeft,
EditorCursorRight,
}Variants§
CommitsLoaded(Vec<CommitInfo>)
Initial commit list loaded on view open.
OperationFailed(String)
Async operation failed (generic).
OperationCompleted
A git operation (rebase / reset) completed successfully.
Carries the new commit list and optionally the pre-op SHA for undo recording.
pre_sha is None for undo operations (so they don’t themselves get undone again).
MoveUp
u — move selected commit one step toward older commits.
MoveDown
d — move selected commit one step toward newer commits.
ConfirmMove
Enter — confirm pending move (run git rebase).
StartReword
r — open the commit message editor for rewording.
StartSquash
s — open the combined message editor for squashing with the commit at
the given index (the older commit; one index higher than cursor).
ConfirmEdit
ctrl+s in editor mode — apply the edited message (triggers git).
DeleteCommit
Del — drop the selected commit (may require a second press).
UndoLast
ctrl+z — undo the last operation (runs git reset --hard <sha>).
EditorInsertChar(char)
Insert a single character into the message buffer.
EditorInsertNewline
Insert a newline into the message buffer.
EditorBackspace
Backspace in the message buffer.
EditorCursorLeft
Move cursor left in the message buffer.
EditorCursorRight
Move cursor right in the message buffer.
Trait Implementations§
Source§impl Clone for HistoryEditorOp
impl Clone for HistoryEditorOp
Source§fn clone(&self) -> HistoryEditorOp
fn clone(&self) -> HistoryEditorOp
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for HistoryEditorOp
impl RefUnwindSafe for HistoryEditorOp
impl Send for HistoryEditorOp
impl Sync for HistoryEditorOp
impl Unpin for HistoryEditorOp
impl UnsafeUnpin for HistoryEditorOp
impl UnwindSafe for HistoryEditorOp
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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