#[non_exhaustive]pub enum Error {
NotARepository(PathBuf),
WorktreeNotFound(PathBuf),
Io(Error),
Vcs(Error),
}Expand description
An error from a Repo operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotARepository(PathBuf)
Repo::open found no .git/.jj from the start dir
up to the filesystem root.
WorktreeNotFound(PathBuf)
A worktree/workspace lookup by path matched no attached worktree.
Io(Error)
A filesystem operation failed (e.g. removing a workspace directory).
Vcs(Error)
An underlying vcs-git / vcs-jj (i.e. processkit) error.
Implementations§
Source§impl Error
impl Error
Sourcepub fn is_merge_conflict(&self) -> bool
pub fn is_merge_conflict(&self) -> bool
Whether this wraps a merge/rebase conflict from the backend — so a
caller can branch on “conflict, resolve it” vs. a hard failure without
matching on processkit::Error internals. (Recognises git’s conflict
markers; jj surfaces conflicts as state, not errors — see
Repo::in_progress_state.)
Named to match the wrapper classifiers
(vcs_cli_support::is_merge_conflict) — one name per concept across the
workspace.
Sourcepub fn is_nothing_to_commit(&self) -> bool
pub fn is_nothing_to_commit(&self) -> bool
Whether this is a benign “nothing to commit” — an empty commit attempt the caller likely wants to treat as a no-op.
Sourcepub fn is_transient_fetch_error(&self) -> bool
pub fn is_transient_fetch_error(&self) -> bool
Whether this is a transient fetch/network failure worth retrying (DNS, connection reset, timeout). The underlying clients already retry their own fetches; this is for retrying higher-level flows.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()