#[non_exhaustive]pub enum WorktreeError {
Show 28 variants
GitNotFound,
GitVersionTooOld {
required: String,
found: String,
},
BranchAlreadyCheckedOut {
branch: String,
worktree: PathBuf,
},
WorktreePathExists(PathBuf),
UncommittedChanges {
files: Vec<String>,
},
UnmergedCommits {
branch: String,
commit_count: usize,
},
DiskSpaceLow {
available_mb: u64,
required_mb: u64,
},
AggregateDiskLimitExceeded,
NetworkFilesystem {
mount_point: PathBuf,
},
NetworkJunctionTarget {
path: PathBuf,
},
WslCrossBoundary,
SubmoduleContext,
StateLockContention {
timeout_ms: u64,
},
OrphanDetected {
paths: Vec<PathBuf>,
},
RateLimitExceeded {
current: usize,
max: usize,
},
CannotDeleteCwd,
WorktreeLocked {
reason: Option<String>,
},
NestedWorktree {
parent: PathBuf,
},
GitCryptLocked,
ReflinkNotSupported,
InvalidStateTransition {
from: WorktreeState,
to: WorktreeState,
},
WorktreeNotInGitRegistry(PathBuf),
BranchExistsWithDifferentBase {
branch: String,
branch_commit: String,
requested_base: String,
requested_commit: String,
},
SetupRequestedWithoutAdapter,
GitCommandFailed {
command: String,
stderr: String,
exit_code: i32,
},
StateCorrupted {
reason: String,
},
CircuitBreakerOpen {
consecutive_failures: u32,
},
Io(Error),
}Expand description
Errors returned by iso-code operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
GitNotFound
GitVersionTooOld
BranchAlreadyCheckedOut
WorktreePathExists(PathBuf)
UncommittedChanges
UnmergedCommits
DiskSpaceLow
AggregateDiskLimitExceeded
NetworkFilesystem
NetworkJunctionTarget
WslCrossBoundary
SubmoduleContext
StateLockContention
OrphanDetected
RateLimitExceeded
CannotDeleteCwd
WorktreeLocked
NestedWorktree
GitCryptLocked
ReflinkNotSupported
InvalidStateTransition
WorktreeNotInGitRegistry(PathBuf)
BranchExistsWithDifferentBase
SetupRequestedWithoutAdapter
GitCommandFailed
StateCorrupted
CircuitBreakerOpen
Io(Error)
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 Freeze for WorktreeError
impl !RefUnwindSafe for WorktreeError
impl Send for WorktreeError
impl Sync for WorktreeError
impl Unpin for WorktreeError
impl UnsafeUnpin for WorktreeError
impl !UnwindSafe for WorktreeError
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
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>
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 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>
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