pub struct SimulationCheckpoint {
pub format_version: u32,
pub journal_end: EvidenceCursor,
pub state: SimulationSnapshot,
pub archived_segment_headers: Vec<ArchivedSegmentHeader>,
pub archived_segment_manifest_root: Option<String>,
pub archived_evidence_receipts: Vec<ArchivedEvidenceReceipt>,
pub archived_receipt_root: Option<String>,
pub evidence_dependencies: Vec<EvidenceDependency>,
pub evidence_dependency_root: Option<String>,
pub keyed_draw_reservations: Vec<KeyedDrawReservation>,
pub keyed_reservation_root: Option<String>,
}Expand description
Current authoritative state plus the journal cut required to validate it.
state deliberately contains empty append-only evidence arrays. It is not a
standalone SimulationSnapshot; load it only with the contiguous evidence
segments ending at journal_end.
Fields§
§format_version: u32§journal_end: EvidenceCursor§state: SimulationSnapshot§archived_segment_headers: Vec<ArchivedSegmentHeader>§archived_segment_manifest_root: Option<String>§archived_evidence_receipts: Vec<ArchivedEvidenceReceipt>§archived_receipt_root: Option<String>§evidence_dependencies: Vec<EvidenceDependency>§evidence_dependency_root: Option<String>§keyed_draw_reservations: Vec<KeyedDrawReservation>§keyed_reservation_root: Option<String>Implementations§
Source§impl SimulationCheckpoint
impl SimulationCheckpoint
Sourcepub fn reachable_archive_segment_ids(
retained_checkpoints: &[Self],
) -> Result<BTreeSet<String>, CanwuError>
pub fn reachable_archive_segment_ids( retained_checkpoints: &[Self], ) -> Result<BTreeSet<String>, CanwuError>
Returns every segment ID reachable from all retained checkpoint manifests.
Hosts must include every checkpoint they still promise to restore before treating a stored segment absent from this set as an orphan candidate.
Sourcepub fn orphaned_archive_segment_ids(
retained_checkpoints: &[Self],
stored_segment_ids: &[String],
) -> Result<Vec<String>, CanwuError>
pub fn orphaned_archive_segment_ids( retained_checkpoints: &[Self], stored_segment_ids: &[String], ) -> Result<Vec<String>, CanwuError>
Returns sorted stored segment IDs that no retained manifest can reach.
This method identifies host-GC candidates only; it never deletes content.
Trait Implementations§
Source§impl Clone for SimulationCheckpoint
impl Clone for SimulationCheckpoint
Source§fn clone(&self) -> SimulationCheckpoint
fn clone(&self) -> SimulationCheckpoint
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SimulationCheckpoint
impl Debug for SimulationCheckpoint
Source§impl<'de> Deserialize<'de> for SimulationCheckpoint
impl<'de> Deserialize<'de> for SimulationCheckpoint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 PartialEq for SimulationCheckpoint
impl PartialEq for SimulationCheckpoint
Source§impl Serialize for SimulationCheckpoint
impl Serialize for SimulationCheckpoint
impl StructuralPartialEq for SimulationCheckpoint
Auto Trait Implementations§
impl Freeze for SimulationCheckpoint
impl RefUnwindSafe for SimulationCheckpoint
impl Send for SimulationCheckpoint
impl Sync for SimulationCheckpoint
impl Unpin for SimulationCheckpoint
impl UnsafeUnpin for SimulationCheckpoint
impl UnwindSafe for SimulationCheckpoint
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