pub struct TaskWorktreeId {
pub session_id: SessionId,
pub worktree_id: String,
}Expand description
Identity of a task worktree inside its owning session.
The worktree branches from the session branch at a base commit the host records when it reserves the Env. Its branch and directory names derive from this identity, so cleanup needs no stored path.
Fields§
§session_id: SessionIdSession that owns the worktree and every cleanup decision.
worktree_id: StringIdentifier unique within the owning session.
Implementations§
Source§impl TaskWorktreeId
impl TaskWorktreeId
Sourcepub fn branch(&self) -> String
pub fn branch(&self) -> String
Returns the worktree’s own branch, distinct from the session branch.
A - suffix rather than a / path keeps the name from colliding
with the session branch ref.
Sourcepub fn directory_name(&self) -> String
pub fn directory_name(&self) -> String
Returns the worktree directory name, a sibling of the session’s shortened worktree directory.
Trait Implementations§
Source§impl Clone for TaskWorktreeId
impl Clone for TaskWorktreeId
Source§impl Debug for TaskWorktreeId
impl Debug for TaskWorktreeId
Source§impl<'de> Deserialize<'de> for TaskWorktreeId
impl<'de> Deserialize<'de> for TaskWorktreeId
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TaskWorktreeId
Source§impl Hash for TaskWorktreeId
impl Hash for TaskWorktreeId
Source§impl PartialEq for TaskWorktreeId
impl PartialEq for TaskWorktreeId
Source§impl Serialize for TaskWorktreeId
impl Serialize for TaskWorktreeId
impl StructuralPartialEq for TaskWorktreeId
Auto Trait Implementations§
impl Forget for TaskWorktreeId
impl Freeze for TaskWorktreeId
impl Move for TaskWorktreeId
impl RefUnwindSafe for TaskWorktreeId
impl Send for TaskWorktreeId
impl Sync for TaskWorktreeId
impl Unpin for TaskWorktreeId
impl UnsafeUnpin for TaskWorktreeId
impl UnwindSafe for TaskWorktreeId
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.