pub enum DiagnosticCode {
Show 18 variants
PathMismatch,
ContainerOccupied,
Nested,
DestinationConflict,
Missing,
StaleRegistration,
BranchAlreadyCheckedOut,
Detached,
Ephemeral,
PrimaryOnNonTrunk,
TrunkInLinkedWorktree,
PathEscape,
InvalidBranchName,
Locked,
MigrationVerificationFailed,
TrunkUnknown,
CaseCollision,
CrossDevice,
}Expand description
The stable machine name of everything that can be wrong with the topology. One code per condition, reused by the command line, the API, MCP, the Cockpit, the tests and the documentation; the prose beside a code is rendered from the typed state.
Variants§
PathMismatch
A linked work tree is not at its branch’s canonical path.
ContainerOccupied
A linked work tree occupies the container path itself.
Nested
A linked work tree sits inside the primary checkout or inside another work tree.
DestinationConflict
The canonical path of a branch is occupied by something that is not its work tree.
Missing
A registered work tree’s directory does not exist.
StaleRegistration
Git reports the registration as prunable.
BranchAlreadyCheckedOut
A branch is checked out somewhere other than its canonical path.
Detached
A linked work tree has no branch.
Ephemeral
A linked work tree is a session’s scratch checkout: under the temporary directory or
under the primary checkout’s .claude/worktrees/.
PrimaryOnNonTrunk
The primary checkout holds a branch that is not the trunk.
TrunkInLinkedWorktree
The trunk is checked out in a linked work tree rather than the primary checkout.
PathEscape
A derived path would leave the container. Cannot happen for a valid branch name.
InvalidBranchName
A branch name git accepted that this executable cannot derive a path for.
Locked
A work tree is locked, so it cannot be moved until it is unlocked.
MigrationVerificationFailed
A move happened and the fingerprint after it differs from the one before.
TrunkUnknown
The trunk could not be determined.
CaseCollision
Two branch names map to one directory on a case-insensitive filesystem.
CrossDevice
A move crossed devices and was made by copy, repair and verification.
Implementations§
Source§impl DiagnosticCode
impl DiagnosticCode
Sourcepub const ALL: &'static [DiagnosticCode]
pub const ALL: &'static [DiagnosticCode]
Every code, for the documentation and the tests that hold it complete.
Trait Implementations§
Source§impl Clone for DiagnosticCode
impl Clone for DiagnosticCode
Source§fn clone(&self) -> DiagnosticCode
fn clone(&self) -> DiagnosticCode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for DiagnosticCode
Source§impl Debug for DiagnosticCode
impl Debug for DiagnosticCode
Source§impl<'de> Deserialize<'de> for DiagnosticCode
impl<'de> Deserialize<'de> for DiagnosticCode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for DiagnosticCode
Source§impl JsonSchema for DiagnosticCode
impl JsonSchema for DiagnosticCode
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Ord for DiagnosticCode
impl Ord for DiagnosticCode
Source§fn cmp(&self, other: &DiagnosticCode) -> Ordering
fn cmp(&self, other: &DiagnosticCode) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for DiagnosticCode
impl PartialEq for DiagnosticCode
Source§fn eq(&self, other: &DiagnosticCode) -> bool
fn eq(&self, other: &DiagnosticCode) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for DiagnosticCode
impl PartialOrd for DiagnosticCode
Source§impl Serialize for DiagnosticCode
impl Serialize for DiagnosticCode
impl StructuralPartialEq for DiagnosticCode
Auto Trait Implementations§
impl Freeze for DiagnosticCode
impl RefUnwindSafe for DiagnosticCode
impl Send for DiagnosticCode
impl Sync for DiagnosticCode
impl Unpin for DiagnosticCode
impl UnsafeUnpin for DiagnosticCode
impl UnwindSafe for DiagnosticCode
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.