Skip to main content

AppAction

Enum AppAction 

Source
pub enum AppAction {
Show 13 variants Handled, Quit, ReloadCommits, PrepareSplit { strategy: SplitStrategy, commit_oid: String, }, ExecuteSplit { strategy: SplitStrategy, commit_oid: String, head_oid: String, }, PrepareDropConfirm { commit_oid: String, commit_summary: String, }, ExecuteDrop { commit_oid: String, head_oid: String, }, RebaseContinue(ConflictState), RebaseAbort(ConflictState), RunMergetool { files: Vec<String>, conflict_state: ConflictState, }, PrepareReword { commit_oid: String, current_message: String, }, PrepareSquash { source_oid: String, target_oid: String, source_message: String, target_message: String, is_fixup: bool, }, ExecuteMove { source_oid: String, insert_after_oid: String, },
}
Expand description

Result of a view module’s handle_key function.

Pure state mutations (scroll, selection, mode transitions) are applied directly to AppState inside the handler. Side effects that require git operations or terminal access are returned here for main.rs to execute.

Variants§

§

Handled

Fully handled, no side effects needed.

§

Quit

The application should quit.

§

ReloadCommits

Reload commits from the repository.

§

PrepareSplit

Begin the split flow: get head_oid, count results, confirm if large.

Fields

§strategy: SplitStrategy
§commit_oid: String
§

ExecuteSplit

Execute a split that has already been confirmed.

Fields

§strategy: SplitStrategy
§commit_oid: String
§head_oid: String
§

PrepareDropConfirm

Begin the drop flow: get head_oid from repo, then show confirmation.

Fields

§commit_oid: String
§commit_summary: String
§

ExecuteDrop

Execute a confirmed drop.

Fields

§commit_oid: String
§head_oid: String
§

RebaseContinue(ConflictState)

Continue a rebase after the user resolved merge conflicts.

§

RebaseAbort(ConflictState)

Abort a rebase that hit conflicts.

§

RunMergetool

Launch the merge tool for conflicting files.

Fields

§files: Vec<String>
§conflict_state: ConflictState
§

PrepareReword

Start the reword flow: get head_oid, launch editor, rewrite commit.

Fields

§commit_oid: String
§current_message: String
§

PrepareSquash

Start the squash/fixup flow: user picked source and target. When is_fixup is true the target’s message is kept as-is (no editor).

Fields

§source_oid: String
§target_oid: String
§source_message: String
§target_message: String
§is_fixup: bool
§

ExecuteMove

Execute a confirmed move: reorder the source commit to after insert_after_oid.

Fields

§source_oid: String
§insert_after_oid: String

Trait Implementations§

Source§

impl Debug for AppAction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.