pub struct WorktreeCopyLease { /* private fields */ }Expand description
What: The disposable settlement lock: released explicitly, or removed when dropped if still held. Why: Release reports an ownership change; the drop fallback cannot report, so it only removes what it still owns.
In TS you’d write (pseudocode):
type WorktreeCopyLease = AsyncDisposable & { leaseToken: string };Implementations§
Source§impl WorktreeCopyLease
impl WorktreeCopyLease
Sourcepub fn lease_token(&self) -> &str
pub fn lease_token(&self) -> &str
The token a nested Git run inherits.
Sourcepub fn release(self) -> Result<(), WorktreeCopyError>
pub fn release(self) -> Result<(), WorktreeCopyError>
Removes the lock when this process still owns it, and fails with the ownership wording otherwise.
Trait Implementations§
Source§impl Debug for WorktreeCopyLease
impl Debug for WorktreeCopyLease
Auto Trait Implementations§
impl Freeze for WorktreeCopyLease
impl RefUnwindSafe for WorktreeCopyLease
impl Send for WorktreeCopyLease
impl Sync for WorktreeCopyLease
impl Unpin for WorktreeCopyLease
impl UnsafeUnpin for WorktreeCopyLease
impl UnwindSafe for WorktreeCopyLease
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