pub struct LockedWorkingCopy<'a> { /* private fields */ }Expand description
A working copy that’s locked on disk. The lock is held until you call
finish() or discard().
Implementations§
Source§impl LockedWorkingCopy<'_>
impl LockedWorkingCopy<'_>
Sourcepub fn old_operation_id(&self) -> &OperationId
pub fn old_operation_id(&self) -> &OperationId
The operation at the time the lock was taken
Sourcepub fn old_tree_id(&self) -> &TreeId
pub fn old_tree_id(&self) -> &TreeId
The tree at the time the lock was taken
pub fn snapshot( &mut self, base_ignores: Arc<GitIgnoreFile>, ) -> Result<TreeId, SnapshotError>
pub fn check_out( &mut self, new_tree: &Tree, ) -> Result<CheckoutStats, CheckoutError>
pub fn reset(&mut self, new_tree: &Tree) -> Result<(), ResetError>
pub fn sparse_patterns(&self) -> &[RepoPath]
pub fn set_sparse_patterns( &mut self, new_sparse_patterns: Vec<RepoPath>, ) -> Result<CheckoutStats, CheckoutError>
pub fn finish(self, operation_id: OperationId)
pub fn discard(self)
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for LockedWorkingCopy<'a>
impl<'a> !RefUnwindSafe for LockedWorkingCopy<'a>
impl<'a> Send for LockedWorkingCopy<'a>
impl<'a> !Sync for LockedWorkingCopy<'a>
impl<'a> Unpin for LockedWorkingCopy<'a>
impl<'a> !UnwindSafe for LockedWorkingCopy<'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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more