#[non_exhaustive]pub enum WorktreeState {
Pending,
Creating,
Active,
Merging,
Deleting,
Deleted,
Orphaned,
Broken,
Locked,
}Expand description
Lifecycle state of a managed worktree.
Deserialization is lenient: unknown variant names (written by a newer
version of iso-code) are mapped to Broken rather than failing, so old
readers don’t reject an otherwise-valid state file. This keeps the enum
forward-compatible despite #[non_exhaustive].
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Pending
Allocated in state.json but git worktree add not yet run.
Creating
git worktree add is in progress.
Active
Ready for use. Normal operating state.
Merging
A merge operation involving this worktree is in progress.
Deleting
git worktree remove is in progress.
Deleted
Successfully deleted. Terminal state.
Orphaned
Present on disk but absent from git worktree list, OR present in state.json but absent from both disk and git.
Broken
git references broken, metadata corrupt, or post-create verification failed (e.g. git-crypt files still encrypted).
Locked
git worktree lock has been called on this worktree.
Trait Implementations§
Source§impl Clone for WorktreeState
impl Clone for WorktreeState
Source§fn clone(&self) -> WorktreeState
fn clone(&self) -> WorktreeState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WorktreeState
impl Debug for WorktreeState
Source§impl<'de> Deserialize<'de> for WorktreeState
impl<'de> Deserialize<'de> for WorktreeState
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>,
Source§impl Hash for WorktreeState
impl Hash for WorktreeState
Source§impl PartialEq for WorktreeState
impl PartialEq for WorktreeState
Source§impl Serialize for WorktreeState
impl Serialize for WorktreeState
impl Eq for WorktreeState
impl StructuralPartialEq for WorktreeState
Auto Trait Implementations§
impl Freeze for WorktreeState
impl RefUnwindSafe for WorktreeState
impl Send for WorktreeState
impl Sync for WorktreeState
impl Unpin for WorktreeState
impl UnsafeUnpin for WorktreeState
impl UnwindSafe for WorktreeState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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