#[non_exhaustive]pub struct WorktreeAdd {
pub path: PathBuf,
pub new_branch: Option<String>,
pub commitish: Option<String>,
}Expand description
Options for GitApi::worktree_add (git worktree add).
#[non_exhaustive], so build it through WorktreeAdd::checkout /
WorktreeAdd::create_branch rather than a struct literal.
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 for the new worktree.
new_branch: Option<String>Create and check out this new branch (-b <name>); None checks out an
existing ref.
commitish: Option<String>The commit/branch to base the worktree on; None defaults to HEAD.
Implementations§
Trait Implementations§
Source§impl Clone for WorktreeAdd
impl Clone for WorktreeAdd
Source§fn clone(&self) -> WorktreeAdd
fn clone(&self) -> WorktreeAdd
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 moreAuto Trait Implementations§
impl Freeze for WorktreeAdd
impl RefUnwindSafe for WorktreeAdd
impl Send for WorktreeAdd
impl Sync for WorktreeAdd
impl Unpin for WorktreeAdd
impl UnsafeUnpin for WorktreeAdd
impl UnwindSafe for WorktreeAdd
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