Struct git2::WorktreeAddOptions
source · pub struct WorktreeAddOptions<'a> { /* private fields */ }
Expand description
Options which can be used to configure how a worktree is initialized
Implementations§
source§impl<'a> WorktreeAddOptions<'a>
impl<'a> WorktreeAddOptions<'a>
sourcepub fn new() -> WorktreeAddOptions<'a>
pub fn new() -> WorktreeAddOptions<'a>
Creates a default set of add options.
By default this will not lock the worktree
sourcepub fn lock(&mut self, enabled: bool) -> &mut WorktreeAddOptions<'a>
pub fn lock(&mut self, enabled: bool) -> &mut WorktreeAddOptions<'a>
If enabled, this will cause the newly added worktree to be locked
sourcepub fn reference(
&mut self,
reference: Option<&'a Reference<'_>>,
) -> &mut WorktreeAddOptions<'a>
pub fn reference( &mut self, reference: Option<&'a Reference<'_>>, ) -> &mut WorktreeAddOptions<'a>
reference to use for the new worktree HEAD
sourcepub fn raw(&self) -> *const git_worktree_add_options
pub fn raw(&self) -> *const git_worktree_add_options
Get a set of raw add options to be used with git_worktree_add
Auto Trait Implementations§
impl<'a> Freeze for WorktreeAddOptions<'a>
impl<'a> RefUnwindSafe for WorktreeAddOptions<'a>
impl<'a> !Send for WorktreeAddOptions<'a>
impl<'a> !Sync for WorktreeAddOptions<'a>
impl<'a> Unpin for WorktreeAddOptions<'a>
impl<'a> UnwindSafe for WorktreeAddOptions<'a>
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