pub enum WorktreeError {
NotAGitRepository {
workspace: PathBuf,
detail: String,
},
NoHeadCommit {
repo_root: PathBuf,
detail: String,
},
GitCommandFailed {
command: String,
detail: String,
},
Io {
context: String,
source: Error,
},
InvalidWorktreeAdminDir {
path: PathBuf,
common_dir: PathBuf,
},
ReattachFailed {
path: PathBuf,
reason: String,
},
}Expand description
Errors raised while provisioning or reattaching an isolated Git worktree.
Variants§
NotAGitRepository
The parent workspace is not inside a Git repository.
NoHeadCommit
The Git repository has no HEAD commit yet.
GitCommandFailed
A git subprocess failed or timed out.
Io
Filesystem I/O failed while preparing worktree directories or snapshots.
InvalidWorktreeAdminDir
The resolved worktree admin directory was outside <git_common_dir>/worktrees.
ReattachFailed
Reattaching to a retained worktree directory failed.
Trait Implementations§
Source§impl Debug for WorktreeError
impl Debug for WorktreeError
Source§impl Display for WorktreeError
impl Display for WorktreeError
Source§impl Error for WorktreeError
impl Error for WorktreeError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for WorktreeError
impl !UnwindSafe for WorktreeError
impl Forget for WorktreeError
impl Freeze for WorktreeError
impl Move for WorktreeError
impl Send for WorktreeError
impl Sync for WorktreeError
impl Unpin for WorktreeError
impl UnsafeUnpin for WorktreeErrorwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const () is !null: UnsafeUnpin,
PhantomData<ErrorData<CustomOwner>>: UnsafeUnpin,
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
Mutably borrows from an owned value. Read more