Skip to main content

IcSnapshotDataCoverage

Struct IcSnapshotDataCoverage 

Source
pub struct IcSnapshotDataCoverage<'metadata> { /* private fields */ }
Expand description

Ephemeral coverage of exact retained metadata by already decoded data replies.

Each region advances contiguously from zero; regions may be interleaved and chunk-store replies may arrive in any order. Retained state is three nat64 cursors and at most 1,024 chunk-presence bits, regardless of snapshot size. Admission retains no data bytes and performs no IO or provider calls. It does not establish authenticated origin, byte custody, durable storage, accounting or permission to repeat reads. Reconstructing this value starts empty; it is never a resume journal or a substitute for one.

Implementations§

Source§

impl<'metadata> IcSnapshotDataCoverage<'metadata>

Source

pub fn new(metadata: &'metadata IcSnapshotMetadataReply<'metadata>) -> Self

Start empty coverage under one exact original metadata evidence owner.

Source

pub fn admit( &mut self, reply: &IcSnapshotDataReply<'_, '_>, ) -> Result<(), IcSnapshotDataCoverageError>

Admit one validated reply, advancing only its region or exact chunk bit.

Reply bytes may be dropped afterwards. That permits bounded streaming, but coverage alone therefore makes no retained-byte or transfer attestation. The order required within a region is a local admission order, not a grant of remote dispatch order or another accounted read.

§Errors

Rejects different metadata request/raw-reply evidence, gaps, overlaps, duplicate ranges or duplicate chunk identities. Every error preserves the previous coverage unchanged.

Source

pub const fn metadata(&self) -> &'metadata IcSnapshotMetadataReply<'metadata>

Read exact original metadata, including non-data globals and optional fields.

Source

pub const fn covered_region_bytes(&self) -> [u64; 3]

Read admitted module, heap and stable byte counts in that order.

Source

pub fn covered_chunks(&self) -> usize

Read the count of distinct admitted chunk-store replies, including empty chunks.

Source

pub fn complete(&self) -> Option<IcSnapshotDataCoverageView<'_, 'metadata>>

Project complete declared data coverage, without an effect or storage permit.

Every region must reach its exact declared size and every known chunk must have an admitted reply. Empty regions require no read; empty stored chunks still require their hash-checked reply. There is no combined-size sum that could overflow when independent regions use the full nat64 domain.

Trait Implementations§

Source§

impl Debug for IcSnapshotDataCoverage<'_>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'metadata> Freeze for IcSnapshotDataCoverage<'metadata>

§

impl<'metadata> RefUnwindSafe for IcSnapshotDataCoverage<'metadata>

§

impl<'metadata> Send for IcSnapshotDataCoverage<'metadata>

§

impl<'metadata> Sync for IcSnapshotDataCoverage<'metadata>

§

impl<'metadata> Unpin for IcSnapshotDataCoverage<'metadata>

§

impl<'metadata> UnsafeUnpin for IcSnapshotDataCoverage<'metadata>

§

impl<'metadata> UnwindSafe for IcSnapshotDataCoverage<'metadata>

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> 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> Same for T

Source§

type Output = T

Should always be Self
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.