pub struct IcSnapshotDataReply<'request, 'metadata> { /* private fields */ }Expand description
Exact bounded data bytes associated with one declared request and metadata reply.
Range replies must have the exact requested length. Chunk-store replies must hash to the requested retained identity, including a valid empty chunk. Neither condition authenticates origin, proves whole-snapshot coverage or settles effects.
Implementations§
Source§impl<'request, 'metadata> IcSnapshotDataReply<'request, 'metadata>
impl<'request, 'metadata> IcSnapshotDataReply<'request, 'metadata>
Sourcepub fn decode(
request: &'request IcSnapshotDataRequest<'metadata>,
bytes: &[u8],
) -> Result<Self, IcSnapshotDataError>
pub fn decode( request: &'request IcSnapshotDataRequest<'metadata>, bytes: &[u8], ) -> Result<Self, IcSnapshotDataError>
Decode exactly one bounded data argument, then admit length/hash association.
§Errors
Rejects excessive raw/chunk bytes, malformed/unsupported/skipped/extra/trailing wire, an inexact range length or bytes with a different chunk-store hash.
Sourcepub const fn request(&self) -> &'request IcSnapshotDataRequest<'metadata>
pub const fn request(&self) -> &'request IcSnapshotDataRequest<'metadata>
Read the exact request and retained metadata association.
Sourcepub fn chunk(&self) -> &[u8] ⓘ
pub fn chunk(&self) -> &[u8] ⓘ
Read exact admitted data bytes, with no mutable access or persistence side effect.
Sourcepub const fn chunk_checksum(&self) -> &ArtifactChecksumRecord
pub const fn chunk_checksum(&self) -> &ArtifactChecksumRecord
Read SHA-256 of actual data, distinct from raw Candid wire identity.
Sourcepub const fn payload_checksum(&self) -> &ArtifactChecksumRecord
pub const fn payload_checksum(&self) -> &ArtifactChecksumRecord
Read SHA-256 of exact raw reply bytes.
Sourcepub fn digest(&self) -> ArtifactChecksumRecord
pub fn digest(&self) -> ArtifactChecksumRecord
Bind exact retained metadata, request and raw reply hashes in the data domain.