Skip to main content

GwmError

Enum GwmError 

Source
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

Fields

§allowed: String
§

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.

Fields

§name: String
§

GuardTripped

Fields

§name: String
§file: String
§

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.

Fields

§reason: String
§

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.

Fields

§kind: &'static str
§source: Error
§

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.

Fields

§branch: String
§

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.

Fields

§root: String
§

WorkspaceRepoRequired

Issue #36: gwm create in workspace mode is ambiguous without an explicit target repo — list the candidates so the user can pick one.

Fields

§available: String
§

WorkspaceRepoNotFound

Issue #36: --repo <name> named a repo that is not present directly under the workspace root.

Fields

§name: String
§available: String
§

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 Debug for GwmError

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Display for GwmError

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Error for GwmError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for GwmError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for GwmError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for GwmError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for GwmError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for GwmError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for GwmError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for GwmError

Source§

fn from(e: Error) -> Self

Converts to this type from the input type.
Source§

impl From<LookupError<VarError>> for GwmError

Source§

fn from(source: LookupError<VarError>) -> Self

Converts to this type from the input type.

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> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert 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>

Convert 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)

Convert &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)

Convert &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
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToCompactString for T
where T: Display,

Source§

impl<T> ToLine for T
where T: Display,

Source§

fn to_line(&self) -> Line<'_>

Converts the value to a Line.
Source§

impl<T> ToSpan for T
where T: Display,

Source§

fn to_span(&self) -> Span<'_>

Converts the value to a Span.
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> ToText for T
where T: Display,

Source§

fn to_text(&self) -> Text<'_>

Converts the value to a Text.
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.