#[non_exhaustive]pub struct WorktreeCreate {
pub path: PathBuf,
pub branch: String,
pub base: String,
}Expand description
Options for Repo::create_worktree.
Built as WorktreeCreate::new(path, "feature").base("main") — the new-branch name
and the fork-point base (both plain strings that a swap would silently accept,
creating a branch named like the base) are named across two builder steps, so
they can’t be transposed. #[non_exhaustive].
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: PathBufWhere the new attached worktree (git) / secondary workspace (jj) is created.
branch: StringThe new branch (git) / bookmark (jj) to create at the worktree.
base: StringThe ref the new branch forks from (git HEAD, jj @, a branch/tag/commit).
Implementations§
Trait Implementations§
Source§impl Clone for WorktreeCreate
impl Clone for WorktreeCreate
Source§fn clone(&self) -> WorktreeCreate
fn clone(&self) -> WorktreeCreate
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 WorktreeCreate
impl Debug for WorktreeCreate
impl Eq for WorktreeCreate
Source§impl PartialEq for WorktreeCreate
impl PartialEq for WorktreeCreate
Source§fn eq(&self, other: &WorktreeCreate) -> bool
fn eq(&self, other: &WorktreeCreate) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for WorktreeCreate
Auto Trait Implementations§
impl Freeze for WorktreeCreate
impl RefUnwindSafe for WorktreeCreate
impl Send for WorktreeCreate
impl Sync for WorktreeCreate
impl Unpin for WorktreeCreate
impl UnsafeUnpin for WorktreeCreate
impl UnwindSafe for WorktreeCreate
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