pub struct TransactionState {
pub pending: PendingJournal,
pub log: InstallLog,
pub intended: BTreeSet<String>,
pub created_paths: BTreeSet<String>,
}Expand description
What: The mutable durable state of one installation: the latest journal, the open log, and every claim and creation so far. Why: The installer reports claims and creations through this state, so each one reaches disk before the next step.
In TS you’d write (pseudocode):
type JournalState = { pending; log; intended: Set<string>; createdPaths: Set<string> };Fields§
§pending: PendingJournalThe latest durable journal.
log: InstallLogThe open append-only log of this stage.
intended: BTreeSet<String>Every selected path claimed so far.
created_paths: BTreeSet<String>Every path whose creation has been recorded so far.
Trait Implementations§
Source§impl InstallRecorder for TransactionState
impl InstallRecorder for TransactionState
Source§fn record_intents(
&mut self,
relative_paths: &[String],
) -> Result<(), WorktreeCopyError>
fn record_intents( &mut self, relative_paths: &[String], ) -> Result<(), WorktreeCopyError>
Records the claims that no earlier record holds, then remembers them.
Source§fn record_creations(
&mut self,
entries: &[InstalledPath],
) -> Result<(), WorktreeCopyError>
fn record_creations( &mut self, entries: &[InstalledPath], ) -> Result<(), WorktreeCopyError>
Records the creations no earlier record holds, then remembers them.
Auto Trait Implementations§
impl Freeze for TransactionState
impl RefUnwindSafe for TransactionState
impl Send for TransactionState
impl Sync for TransactionState
impl Unpin for TransactionState
impl UnsafeUnpin for TransactionState
impl UnwindSafe for TransactionState
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