pub struct BootstrapJob {
pub job_id: BootstrapJobId,
pub snapshot_id: SnapshotId,
pub manifest_root: [u8; 32],
pub boundary: SnapshotBoundary,
pub schema_version: ProjectionSchemaVersion,
pub staging_generation: ReplicaGeneration,
pub mutation_policy: BootstrapMutationPolicy,
pub pending_intent_digest: [u8; 32],
pub state: BootstrapState,
pub chunks: BTreeMap<u32, ChunkProgress>,
}Expand description
Complete durable job record; manifest identity and scope cannot drift on resume.
Fields§
§job_id: BootstrapJobId§snapshot_id: SnapshotId§manifest_root: [u8; 32]§boundary: SnapshotBoundary§schema_version: ProjectionSchemaVersion§staging_generation: ReplicaGeneration§mutation_policy: BootstrapMutationPolicy§pending_intent_digest: [u8; 32]§state: BootstrapState§chunks: BTreeMap<u32, ChunkProgress>Implementations§
Source§impl BootstrapJob
impl BootstrapJob
Sourcepub fn new(
manifest: &SnapshotManifest,
staging_generation: ReplicaGeneration,
mutation_policy: BootstrapMutationPolicy,
pending: &PendingIntentPlan,
) -> Result<Self, BootstrapError>
pub fn new( manifest: &SnapshotManifest, staging_generation: ReplicaGeneration, mutation_policy: BootstrapMutationPolicy, pending: &PendingIntentPlan, ) -> Result<Self, BootstrapError>
Creates a job whose per-chunk progress exactly matches a verified manifest.
§Errors
Rejects an invalid manifest.
Sourcepub fn transition(&mut self, next: BootstrapState) -> Result<(), BootstrapError>
pub fn transition(&mut self, next: BootstrapState) -> Result<(), BootstrapError>
Fails closed when the durable state machine is asked to skip a phase.
§Errors
Returns BootstrapError::IllegalTransition for an undeclared edge.
Sourcepub fn validate_resume(
&self,
manifest: &SnapshotManifest,
) -> Result<(), BootstrapError>
pub fn validate_resume( &self, manifest: &SnapshotManifest, ) -> Result<(), BootstrapError>
Verifies immutable resume identity and exact manifest chunk membership.
§Errors
Rejects a changed snapshot, boundary, schema, root, or chunk map.
Sourcepub fn record_chunk_read(
&mut self,
descriptor: &ChunkDescriptor,
read: &ChunkRead,
) -> Result<ChunkProgress, BootstrapError>
pub fn record_chunk_read( &mut self, descriptor: &ChunkDescriptor, read: &ChunkRead, ) -> Result<ChunkProgress, BootstrapError>
Records one bounded range response while preserving immutable object identity.
The returned progress must be persisted before requesting the next range.
§Errors
Rejects an unknown chunk, identity drift, non-contiguous offset, overflow, or premature completion.
Sourcepub fn mark_chunk_verified(
&mut self,
descriptor: &ChunkDescriptor,
) -> Result<(), BootstrapError>
pub fn mark_chunk_verified( &mut self, descriptor: &ChunkDescriptor, ) -> Result<(), BootstrapError>
Advances an exactly downloaded chunk after independent content verification.
§Errors
Rejects unknown chunks and phase skipping.
Sourcepub fn mark_chunk_installed(
&mut self,
descriptor: &ChunkDescriptor,
) -> Result<(), BootstrapError>
pub fn mark_chunk_installed( &mut self, descriptor: &ChunkDescriptor, ) -> Result<(), BootstrapError>
Advances a verified chunk only after the adapter atomically installs records and progress.
§Errors
Rejects unknown chunks and phase skipping.
Sourcepub fn status(&self) -> BootstrapStatus
pub fn status(&self) -> BootstrapStatus
Returns payload-free progress for status UIs and telemetry.
Trait Implementations§
Source§impl Clone for BootstrapJob
impl Clone for BootstrapJob
Source§fn clone(&self) -> BootstrapJob
fn clone(&self) -> BootstrapJob
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more