Skip to main content

BootstrapJob

Struct BootstrapJob 

Source
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

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn status(&self) -> BootstrapStatus

Returns payload-free progress for status UIs and telemetry.

Trait Implementations§

Source§

impl Clone for BootstrapJob

Source§

fn clone(&self) -> BootstrapJob

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BootstrapJob

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for BootstrapJob

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for BootstrapJob

Source§

impl PartialEq for BootstrapJob

Source§

fn eq(&self, other: &BootstrapJob) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for BootstrapJob

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for BootstrapJob

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.