pub struct Worktree {
pub root_path: PathBuf,
pub worktree_path: PathBuf,
pub default_branch: String,
pub environment: Environment,
}Expand description
Resolved Git worktree metadata used by treeboot operations.
Fields§
§root_path: PathBufSource checkout used for file operations.
worktree_path: PathBufCurrent worktree root where targets and commands are anchored.
default_branch: StringBest-effort default branch name.
environment: EnvironmentCanonical treeboot variables and compatibility aliases.
Implementations§
Source§impl Worktree
impl Worktree
Sourcepub fn discover(options: WorktreeOptions) -> Result<Self>
pub fn discover(options: WorktreeOptions) -> Result<Self>
Discovers worktree metadata from the provided options.
§Errors
Returns an error if the current directory cannot be read, the directory is not inside a Git worktree, Git discovery fails, or no root checkout path can be determined.
Trait Implementations§
impl Eq for Worktree
Source§impl From<&Worktree> for WorktreeSnapshot
impl From<&Worktree> for WorktreeSnapshot
impl StructuralPartialEq for Worktree
Auto Trait Implementations§
impl Freeze for Worktree
impl RefUnwindSafe for Worktree
impl Send for Worktree
impl Sync for Worktree
impl Unpin for Worktree
impl UnsafeUnpin for Worktree
impl UnwindSafe for Worktree
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