#[non_exhaustive]pub struct WorktreeHandle {
pub path: PathBuf,
pub branch: String,
pub base_commit: String,
pub state: WorktreeState,
pub created_at: String,
pub creator_pid: u32,
pub creator_name: String,
pub adapter: Option<String>,
pub setup_complete: bool,
pub port: Option<u16>,
pub session_uuid: String,
}Expand description
A handle to a managed git worktree, containing all metadata tracked by iso-code.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.path: PathBufAbsolute path to the worktree directory on disk.
branch: StringBranch name exactly as passed to create() — never transformed.
base_commit: StringFull 40-char commit SHA at creation time (the –base ref resolved).
state: WorktreeStateCurrent lifecycle state.
created_at: StringISO 8601 creation timestamp (UTC).
creator_pid: u32PID of the process that called Manager::create().
creator_name: StringHuman-readable name of the tool that created this worktree. Examples: “claude-squad”, “workmux”, “claude-code”, “manual”
adapter: Option<String>Name of the EcosystemAdapter used, if any.
setup_complete: boolWhether adapter.setup() completed without error.
port: Option<u16>Allocated port number (the actual port, not an offset). None if port allocation was not requested.
session_uuid: StringStable UUID for this worktree’s entire lifetime. Used in multi-factor lock identity and port lease keying.
Implementations§
Source§impl WorktreeHandle
impl WorktreeHandle
Sourcepub fn new(
path: PathBuf,
branch: String,
base_commit: String,
state: WorktreeState,
created_at: String,
creator_pid: u32,
creator_name: String,
adapter: Option<String>,
setup_complete: bool,
port: Option<u16>,
session_uuid: String,
) -> Self
pub fn new( path: PathBuf, branch: String, base_commit: String, state: WorktreeState, created_at: String, creator_pid: u32, creator_name: String, adapter: Option<String>, setup_complete: bool, port: Option<u16>, session_uuid: String, ) -> Self
Create a new WorktreeHandle. Used internally by Manager.
Trait Implementations§
Source§impl Clone for WorktreeHandle
impl Clone for WorktreeHandle
Source§fn clone(&self) -> WorktreeHandle
fn clone(&self) -> WorktreeHandle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for WorktreeHandle
impl RefUnwindSafe for WorktreeHandle
impl Send for WorktreeHandle
impl Sync for WorktreeHandle
impl Unpin for WorktreeHandle
impl UnsafeUnpin for WorktreeHandle
impl UnwindSafe for WorktreeHandle
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