#[non_exhaustive]pub struct WorktreeInfo {
pub path: PathBuf,
pub branch: Option<String>,
pub commit: Option<String>,
pub is_bare: bool,
}Expand description
One attached worktree (git) / workspace (jj).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.path: PathBufFilesystem path of the worktree’s working copy.
branch: Option<String>The branch (git) or first bookmark (jj) on it; None when detached/none.
commit: Option<String>The checked-out commit; None when unavailable (e.g. a bare git entry).
is_bare: boolA bare git worktree entry (always false for jj).
Trait Implementations§
Source§impl Clone for WorktreeInfo
impl Clone for WorktreeInfo
Source§fn clone(&self) -> WorktreeInfo
fn clone(&self) -> WorktreeInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WorktreeInfo
impl Debug for WorktreeInfo
impl Eq for WorktreeInfo
Source§impl PartialEq for WorktreeInfo
impl PartialEq for WorktreeInfo
Source§fn eq(&self, other: &WorktreeInfo) -> bool
fn eq(&self, other: &WorktreeInfo) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for WorktreeInfo
Auto Trait Implementations§
impl Freeze for WorktreeInfo
impl RefUnwindSafe for WorktreeInfo
impl Send for WorktreeInfo
impl Sync for WorktreeInfo
impl Unpin for WorktreeInfo
impl UnsafeUnpin for WorktreeInfo
impl UnwindSafe for WorktreeInfo
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