#[non_exhaustive]pub struct WorktreeRemove {
pub path: PathBuf,
pub force: bool,
}Expand description
Options for Repo::remove_worktree.
#[non_exhaustive], so build it through WorktreeRemove::new and the chained
force setter rather than a struct literal — a bare
bool at the call site (remove_worktree(path, true)) doesn’t say what true
means, and this leaves room to add options without a breaking signature change.
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: PathBufThe attached worktree (git) / secondary workspace (jj) path to remove.
force: boolRemove even when the worktree has uncommitted changes — git worktree remove --force; on jj, the snapshot-and-refuse-if-dirty guard is bypassed. The
repository’s main worktree/workspace is refused regardless of this flag.
Implementations§
Trait Implementations§
Source§impl Clone for WorktreeRemove
impl Clone for WorktreeRemove
Source§fn clone(&self) -> WorktreeRemove
fn clone(&self) -> WorktreeRemove
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 WorktreeRemove
impl Debug for WorktreeRemove
impl Eq for WorktreeRemove
Source§impl PartialEq for WorktreeRemove
impl PartialEq for WorktreeRemove
Source§fn eq(&self, other: &WorktreeRemove) -> bool
fn eq(&self, other: &WorktreeRemove) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for WorktreeRemove
Auto Trait Implementations§
impl Freeze for WorktreeRemove
impl RefUnwindSafe for WorktreeRemove
impl Send for WorktreeRemove
impl Sync for WorktreeRemove
impl Unpin for WorktreeRemove
impl UnsafeUnpin for WorktreeRemove
impl UnwindSafe for WorktreeRemove
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