pub struct Worktree {
pub name: String,
pub path: PathBuf,
pub label: String,
pub branch: Option<String>,
pub subject: String,
pub time_unix: i64,
pub current: bool,
pub main: bool,
pub missing: bool,
}Expand description
One working copy of the repository: git’s main worktree, a linked one, or a jj workspace.
Fields§
§name: Stringgit’s worktree name, or the jj workspace name.
path: PathBuf§label: StringThe checked-out branch, or what stands in for one.
branch: Option<String>None for a detached HEAD, a missing folder and a jj workspace.
subject: String§time_unix: i64§current: boolThe worktree this handle reads.
main: boolgit’s main worktree, which only goes away with the repository.
missing: boolIts folder is gone, so removing it only drops the record.
Trait Implementations§
impl Eq for Worktree
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