pub struct LandingWorkspace {
pub transaction_id: String,
pub directory: PathBuf,
pub shadow: PathBuf,
pub captured_index: PathBuf,
pub commit_index: PathBuf,
pub preserved: bool,
}Expand description
What:
The transaction state a landing reads and marks.
Why:
CommitTransactionWorkspace:
the landing needs the directory and its private indexes,
and tells the caller whether recovery now owns the directory.
In TS you’d write (pseudocode):
type CommitTransactionWorkspace = { transactionId; directory; commitIndexPath; capturedIndexPath; shadowPath; preserveForRecovery(); finishTransaction() };Fields§
§transaction_id: StringTransaction ID, also the reflog nonce.
directory: PathBufDurable transaction directory.
shadow: PathBufShadow repository holding the prepared commit.
captured_index: PathBufExact real index snapshot taken at invocation.
commit_index: PathBufPrivate commit index.
preserved: boolWhether a landing record hands the directory to recovery,
so the caller’s disposal must leave it in place.
Set before landing-<n>.json is written and cleared again when the compare-and-swap is lost.
Trait Implementations§
Source§impl Clone for LandingWorkspace
impl Clone for LandingWorkspace
Source§impl Debug for LandingWorkspace
impl Debug for LandingWorkspace
impl Eq for LandingWorkspace
Source§impl PartialEq for LandingWorkspace
impl PartialEq for LandingWorkspace
impl StructuralPartialEq for LandingWorkspace
Auto Trait Implementations§
impl Freeze for LandingWorkspace
impl RefUnwindSafe for LandingWorkspace
impl Send for LandingWorkspace
impl Sync for LandingWorkspace
impl Unpin for LandingWorkspace
impl UnsafeUnpin for LandingWorkspace
impl UnwindSafe for LandingWorkspace
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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