Public declaration syntax from forge-rs/crates/forge-code-safety/src/worktree.rs Original source SHA-256: d2fb48b09bf630fba3d8977a508dbf16947070c255892ad4e608df6805b618bc Function bodies and constant values are omitted. This is not the complete implementation. Source line 53 #[derive(Debug, Clone, Serialize, Deserialize)] pub struct WorktreeInfo { } Source line 70 pub fn id(&self) -> &str; Source line 75 pub fn path(&self) -> &Path; Source line 80 pub fn branch(&self) -> &str; Source line 85 pub fn agent_did(&self) -> &str; Source line 90 pub fn repo_root(&self) -> &Path; Source line 95 pub fn created_at(&self) -> DateTime; Source line 109 pub struct WorktreeManager { } Source line 126 pub fn new(repo_root: &Path) -> Self; Source line 141 pub fn with_base(repo_root: &Path, worktree_base: &Path) -> Self; Source line 164 pub async fn create( &self, agent_did: &str, branch_name: &str, ) -> CodeSafetyResult; Source line 243 pub async fn remove(&self, worktree: &WorktreeInfo) -> CodeSafetyResult<()>; Source line 273 pub async fn list(&self) -> Vec; Source line 281 pub async fn find_by_agent(&self, agent_did: &str) -> Option; Source line 293 pub async fn worktree_for_path(&self, path: &Path) -> Option; Source line 302 pub fn repo_root(&self) -> &Path; Source line 327 #[derive(Debug, Clone)] pub struct WorktreeGuard { } Source line 333 pub fn new(info: WorktreeInfo) -> Self; Source line 338 pub fn info(&self) -> &WorktreeInfo; Source line 352 pub fn validate_path(&self, path: &Path) -> CodeSafetyResult<()>; Source line 373 pub fn validate_branch(&self, branch: &str) -> CodeSafetyResult<()>; Source line 418 pub fn is_protected_branch(branch: &str) -> bool;