pub struct WorktreeHydrationCandidate { /* private fields */ }Expand description
Disposable target-local database prepared from a consistent control-atlas backup.
Implementations§
Source§impl WorktreeHydrationCandidate
impl WorktreeHydrationCandidate
Sourcepub fn path(&self) -> DbResult<&Path>
pub fn path(&self) -> DbResult<&Path>
Borrow the unpublished candidate database path.
§Errors
Returns an error only after activation has consumed the private path.
Sourcepub fn destination_database(&self) -> &Path
pub fn destination_database(&self) -> &Path
Borrow the no-clobber activation destination.
Sourcepub const fn source_project_instance_id(&self) -> ProjectInstanceId
pub const fn source_project_instance_id(&self) -> ProjectInstanceId
Return the source control-atlas identity captured by the backup.
Sourcepub const fn target_project_instance_id(&self) -> ProjectInstanceId
pub const fn target_project_instance_id(&self) -> ProjectInstanceId
Return the new independently writable target-atlas identity.
Sourcepub const fn baseline_generation(&self) -> IndexGeneration
pub const fn baseline_generation(&self) -> IndexGeneration
Return the generation containing the rebound source baseline.
Sourcepub fn accept_verified_source_state(
&mut self,
control: &IndexWorkControl,
) -> DbResult<()>
pub fn accept_verified_source_state( &mut self, control: &IndexWorkControl, ) -> DbResult<()>
Accept an exact no-delta source verification from the normal runtime scanner.
§Errors
Returns an error when the candidate no longer exposes its complete rebound baseline or cancellation has been requested. Callers must invoke this only after comparing the exact target source and derivation contract with the candidate.
Sourcepub fn prepare_activation(
self,
control: &IndexWorkControl,
) -> DbResult<PreparedWorktreeHydrationCandidate>
pub fn prepare_activation( self, control: &IndexWorkControl, ) -> DbResult<PreparedWorktreeHydrationCandidate>
Verify post-backup reconciliation, checkpoint WAL, and prepare for publication.
§Errors
Returns an error while the candidate is incomplete, busy, canceled, or corrupt. Failure leaves the destination untouched and removes the unpublished candidate.
Sourcepub fn activate(
self,
control: &IndexWorkControl,
) -> DbResult<WorktreeHydrationActivation>
pub fn activate( self, control: &IndexWorkControl, ) -> DbResult<WorktreeHydrationActivation>
Verify and publish this candidate without replacing an existing destination.
This compatibility convenience performs both phases. Lifecycle-sensitive callers should
call Self::prepare_activation before acquiring external writer exclusion, then publish
the returned PreparedWorktreeHydrationCandidate inside that short critical section.
§Errors
Returns an error while preparation fails or another process creates the destination first.