pub struct LandingRecord {
pub attempt: i64,
pub operation: LandingOperation,
pub expected_old: Base,
pub new_oid: Option<String>,
pub landed_tree_oid: String,
pub pre_landing_index: FileIdentity,
pub post_index: FileIdentity,
pub lock: LockIdentity,
pub pack_name: Option<String>,
pub added_paths: Vec<AddedPath>,
pub selected_worktree_paths: Vec<AddedPath>,
}Expand description
What:
landing-<n>.json:
one landing attempt inside the critical section.
Why:
Recovery decides from it whether the attempt landed and completes or discards it.
In TS you’d write (pseudocode):
type LandingRecord = { schemaVersion: 2; state: 'landing'; attempt; operation; expectedOld; newOid?; ... };Fields§
§attempt: i64Landing attempt number, from 1.
operation: LandingOperationLanding kind.
expected_old: BaseExpected old target value for compare-and-swap.
new_oid: Option<String>New target value; absent for a normalization.
landed_tree_oid: StringTree the landing installs into the real index.
pre_landing_index: FileIdentityExact pre-landing real index snapshot identity.
post_index: FileIdentityExact post-index artifact identity.
lock: LockIdentityReal index.lock identity.
pack_name: Option<String>Migrated pack name; absent for a normalization.
added_paths: Vec<AddedPath>Policy-added path records.
selected_worktree_paths: Vec<AddedPath>Selected worktree completion records.
Trait Implementations§
Source§impl Clone for LandingRecord
impl Clone for LandingRecord
Source§impl Debug for LandingRecord
impl Debug for LandingRecord
impl Eq for LandingRecord
Source§impl PartialEq for LandingRecord
impl PartialEq for LandingRecord
impl StructuralPartialEq for LandingRecord
Auto Trait Implementations§
impl Freeze for LandingRecord
impl RefUnwindSafe for LandingRecord
impl Send for LandingRecord
impl Sync for LandingRecord
impl Unpin for LandingRecord
impl UnsafeUnpin for LandingRecord
impl UnwindSafe for LandingRecord
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