pub enum GwmError {
Show 25 variants
NotInGitRepo,
Git(Error),
Io(Error),
TomlParse(Error),
TomlSer(Error),
Regex(Error),
ShellExpand(LookupError<VarError>),
InvalidBranchType {
got: String,
allowed: String,
},
InvalidIssue(String),
InvalidDescription(String),
WorktreeNotFound(String),
WorktreeExists(String, String),
BranchExists {
name: String,
oid: String,
},
GuardTripped {
name: String,
file: String,
},
CommandFailed(String),
Config(String),
UnbornHead {
reason: String,
},
GhJsonParse {
kind: &'static str,
source: Error,
},
JsonSerialize(Error),
LinkMissing {
kind: LinkKind,
branch: String,
},
EmptyWorkspace {
root: String,
},
WorkspaceRepoRequired {
available: String,
},
WorkspaceRepoNotFound {
name: String,
available: String,
},
WorkspaceUnsupportedCommand,
Other(String),
}Variants§
NotInGitRepo
Git(Error)
Io(Error)
TomlParse(Error)
TomlSer(Error)
Regex(Error)
ShellExpand(LookupError<VarError>)
InvalidBranchType
InvalidIssue(String)
InvalidDescription(String)
WorktreeNotFound(String)
WorktreeExists(String, String)
BranchExists
gwm create refuses to silently reuse a pre-existing local branch
(issue #99). The caller must opt in explicitly (--reuse-branch /
reuse_branch: true) to attach the new worktree to the existing
branch tip; otherwise this surfaces so the user can delete the
stale ref or rename their request rather than ending up on
whatever commit the stale branch resurrected.
GuardTripped
CommandFailed(String)
Generic command/spawn failure. The variant is shared between
every subcommand that shells out (bootstrap steps, gwm tmux,
gwm zellij, the git log / git status previews in the TUI
sidebar, …); callers prepend their own operation name into the
inner string so the rendered message stays attributable to the
verb the user actually typed.
Config(String)
UnbornHead
Issue #105: HEAD is unborn (no commits yet) or detached when a
command that needs the current branch shorthand is invoked.
Split out of Other so callers (and the TUI status line) can
distinguish “no current branch” from arbitrary string errors.
GhJsonParse
Issue #105: failed to deserialize a gh CLI JSON payload.
kind names the payload ("issue", "pr", "pr list",
"labels", "milestones") so the user can grep for which
gh contract changed; source carries the underlying
serde_json::Error for downstream introspection.
JsonSerialize(Error)
Issue #38: failed to serialize a --format=json / daemon JSON-RPC
payload. The output DTOs in json_api are plain structs so this is
effectively unreachable, but surfacing it as a typed error keeps the
JSON output paths off unwrap/expect (CLAUDE.md house rule).
LinkMissing
Issue #105: gwm open / gwm link was asked for an issue or PR
linked to a branch but no such link is recorded in git-config.
kind names which side (issue vs PR) is missing; branch is
the branch shorthand the user queried.
EmptyWorkspace
Issue #36: --workspace <dir> pointed at a directory that holds no
git repos directly below it. Surfaced rather than opening an empty
table / TUI so the user can tell a wrong path from an empty root.
WorkspaceRepoRequired
Issue #36: gwm create in workspace mode is ambiguous without an
explicit target repo — list the candidates so the user can pick one.
WorkspaceRepoNotFound
Issue #36: --repo <name> named a repo that is not present directly
under the workspace root.
WorkspaceUnsupportedCommand
Issue #36: --workspace is a global flag, so clap accepts it for every
subcommand, but only list, create and bare gwm (the TUI) implement
it. Reject it elsewhere rather than silently ignoring it and acting on
the current single repo — a wrong-target footgun for destructive
commands like gwm remove (Codex review #303 P2).
Other(String)
Trait Implementations§
Source§impl Error for GwmError
impl Error for GwmError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for GwmError
impl !UnwindSafe for GwmError
impl Freeze for GwmError
impl Send for GwmError
impl Sync for GwmError
impl Unpin for GwmError
impl UnsafeUnpin for GwmError
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> 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 moreSource§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more