pub struct IcSnapshotUploadRequest<'source> { /* private fields */ }Expand description
Ephemeral exact wire payload with retained source evidence; no dispatch permission.
Pure construction admits declarations only. Guarded persistence operations supply fresh local byte binding. Integrations qualify authentic source/complete transfer, new destination attribution, original spending, current controller/custody and same-release application safety. No serialization, replacement, relocation, allowance or automatic outcome is introduced.
Implementations§
Source§impl<'source> IcSnapshotUploadRequest<'source>
impl<'source> IcSnapshotUploadRequest<'source>
Sourcepub fn metadata(
source_plan: &'source OperationPlanRecord,
source: &'source IcSnapshotMetadataReply<'source>,
source_checksum: &ArtifactChecksumRecord,
) -> Result<Self, IcSnapshotUploadError>
pub fn metadata( source_plan: &'source OperationPlanRecord, source: &'source IcSnapshotMetadataReply<'source>, source_checksum: &ArtifactChecksumRecord, ) -> Result<Self, IcSnapshotUploadError>
Encode exact uploadable original metadata for the same declared canister.
Globals retain order and bits. Unavailable slots reject; absent timer/hook values stay absent and do not default to inactive/ready states. Replacement is always absent; this payload has no source-snapshot deletion lane. Build these nonrecursive bytes before retaining their original operation plan.
§Errors
Rejects unavailable globals, encoding failure and excessive arguments.
Sourcepub fn data(
metadata: &Self,
snapshot_id: &[u8],
source_kind: SnapshotDataKind,
chunk: &[u8],
) -> Result<Self, IcSnapshotUploadError>
pub fn data( metadata: &Self, snapshot_id: &[u8], source_kind: SnapshotDataKind, chunk: &[u8], ) -> Result<Self, IcSnapshotUploadError>
Encode one exact source extent/chunk for a separately qualified new raw ID.
Requires the original metadata upload declaration. Regions are nonempty and bounded to 1 MiB; an empty known chunk requires its exact SHA-256. Actual new snapshot attribution is not inferred from a supplied ID or decoded reply. Data requests include their new ID before their own plan/reservation is retained; metadata authority never supplies data-call spending or resets prior journals.
§Errors
Rejects a non-metadata original, invalid/reused ID, source range/hash or byte mismatch, excessive data/arguments and encoding failure.
Sourcepub const fn source_plan(&self) -> &'source OperationPlanRecord
pub const fn source_plan(&self) -> &'source OperationPlanRecord
Read the exact original source plan; later upload intent must retain its context.
Sourcepub const fn source(&self) -> &'source IcSnapshotMetadataReply<'source>
pub const fn source(&self) -> &'source IcSnapshotMetadataReply<'source>
Read original metadata/request evidence; it authenticates no source.
Sourcepub const fn source_checksum(&self) -> &ArtifactChecksumRecord
pub const fn source_checksum(&self) -> &ArtifactChecksumRecord
Read declared retained tree checksum; pure construction verifies no files.
Sourcepub const fn kind(&self) -> &IcSnapshotUploadKind
pub const fn kind(&self) -> &IcSnapshotUploadKind
Read the closed kind and exact source/destination association.
Sourcepub const fn receiver(&self) -> &'static str
pub const fn receiver(&self) -> &'static str
Read fixed management receiver, separate from effective routing.
Sourcepub const fn method(&self) -> &'static str
pub const fn method(&self) -> &'static str
Read the exact replicated host-update method; no query mode exists.
Sourcepub fn arguments(&self) -> &[u8] ⓘ
pub fn arguments(&self) -> &[u8] ⓘ
Read exact canonical encoded bytes, without signing or spending.
Sourcepub fn digest(&self) -> ArtifactChecksumRecord
pub fn digest(&self) -> ArtifactChecksumRecord
Hash wire payload only, before plan/authority derivation, using its canonical owner.
Sourcepub fn binding_digest(&self) -> ArtifactChecksumRecord
pub fn binding_digest(&self) -> ArtifactChecksumRecord
Bind original source evidence/tree and metadata origin separately from wire intent.