Skip to main content

IcSnapshotUploadRequest

Struct IcSnapshotUploadRequest 

Source
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>

Source

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.

Source

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.

Source

pub const fn source_plan(&self) -> &'source OperationPlanRecord

Read the exact original source plan; later upload intent must retain its context.

Source

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

Read original metadata/request evidence; it authenticates no source.

Source

pub const fn source_checksum(&self) -> &ArtifactChecksumRecord

Read declared retained tree checksum; pure construction verifies no files.

Source

pub const fn kind(&self) -> &IcSnapshotUploadKind

Read the closed kind and exact source/destination association.

Source

pub fn target(&self) -> &str

Read the same canonical source/destination canister target.

Source

pub const fn receiver(&self) -> &'static str

Read fixed management receiver, separate from effective routing.

Source

pub const fn method(&self) -> &'static str

Read the exact replicated host-update method; no query mode exists.

Source

pub fn arguments(&self) -> &[u8] ⓘ

Read exact canonical encoded bytes, without signing or spending.

Source

pub fn digest(&self) -> ArtifactChecksumRecord

Hash wire payload only, before plan/authority derivation, using its canonical owner.

Source

pub fn binding_digest(&self) -> ArtifactChecksumRecord

Bind original source evidence/tree and metadata origin separately from wire intent.

Trait Implementations§

Source§

impl Debug for IcSnapshotUploadRequest<'_>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'source> Freeze for IcSnapshotUploadRequest<'source>

§

impl<'source> RefUnwindSafe for IcSnapshotUploadRequest<'source>

§

impl<'source> Send for IcSnapshotUploadRequest<'source>

§

impl<'source> Sync for IcSnapshotUploadRequest<'source>

§

impl<'source> Unpin for IcSnapshotUploadRequest<'source>

§

impl<'source> UnsafeUnpin for IcSnapshotUploadRequest<'source>

§

impl<'source> UnwindSafe for IcSnapshotUploadRequest<'source>

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.