pub enum Effect {
Show 17 variants
None,
Switch(PathBuf),
Quit,
TooSmall,
Create {
branch: String,
base: Option<String>,
decision: Option<CreateDecision>,
},
Remove(usize),
DeleteBranch {
branch: String,
force: bool,
},
MaterializeBranch {
branch: String,
},
FetchPrs,
CheckoutPr(u64),
CheckoutBranch {
worktree_index: usize,
branch: String,
},
Sync {
worktree_index: usize,
},
InitSubmodules {
dir: PathBuf,
count: usize,
},
OpenEditor(PathBuf),
Refresh,
DraftPrAi,
SubmitPr {
title: String,
body: String,
draft: bool,
},
}Expand description
An action for the runtime to perform after a state transition.
Variants§
None
Nothing to do.
Switch(PathBuf)
Switch to the given path (print it, exit).
Quit
Quit without switching.
TooSmall
The terminal is too small; exit with a message (spec §10).
Create
Create a worktree for branch based on base. decision is None for
the initial attempt — the runtime then pre-flights the base for staleness
(issue #56) and may bounce to the confirm modal — or a concrete choice when
re-issued from that modal (update the base first, or proceed as-is).
Fields
decision: Option<CreateDecision>The stale-base decision: None to pre-flight, else the chosen action.
Remove(usize)
Remove the worktree at the given index (confirmed; force semantics).
DeleteBranch
Delete the local branch branch of a worktree-less branch row (confirmed;
issue #53). force uses git branch -D to delete an unmerged branch.
Fields
MaterializeBranch
Create a worktree for an existing worktree-less branch and switch into it
(confirmed). The runtime materializes the branch via the new path and
records the new worktree as the chosen path (issue #47).
FetchPrs
Open the PR picker — the runtime fetches PRs.
CheckoutPr(u64)
Check out the PR with the given number.
CheckoutBranch
Check out branch in the worktree at worktree_index (in place).
Fields
Sync
Sync (pull then push) the worktree at worktree_index in place (issue #63).
InitSubmodules
Initialize the submodules in dir recursively (confirmed; issue #50).
Fields
OpenEditor(PathBuf)
Open the given path in the editor.
Refresh
Force a full async refresh.
DraftPrAi
Draft the PR title/body with the code agent (seeds the compose form).
SubmitPr
Submit the composed PR (push + create/update).
Trait Implementations§
impl Eq for Effect
impl StructuralPartialEq for Effect
Auto Trait Implementations§
impl Freeze for Effect
impl RefUnwindSafe for Effect
impl Send for Effect
impl Sync for Effect
impl Unpin for Effect
impl UnsafeUnpin for Effect
impl UnwindSafe for Effect
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