pub struct IcManagementRequestRecord { /* private fields */ }Expand description
Immutable v1 request declaration with model-derived exact Candid bytes.
All supported methods use replicated update ingress, including observations. Network/caller selection, signing, freshness, budgets, custody and lifecycle safety are not granted by this record or its digest.
Implementations§
Source§impl IcManagementRequestRecord
impl IcManagementRequestRecord
Sourcepub fn new(request: IcManagementRequest) -> Result<Self, IcRequestError>
pub fn new(request: IcManagementRequest) -> Result<Self, IcRequestError>
Validate the closed request and encode exact host-ingress arguments.
Capture retains code and creates a new snapshot; sender canister version stays absent for host ingress. Load names exact raw bytes, with no identity remap.
§Errors
Rejects malformed principals, missing/unexpected/oversized snapshot IDs, Candid encoding failure and excessive derived argument bytes.
Sourcepub const fn method(&self) -> IcManagementMethodRecord
pub const fn method(&self) -> IcManagementMethodRecord
Read the exact closed method; its effect class does not grant spending authority.
Sourcepub fn target(&self) -> &str
pub fn target(&self) -> &str
Read the canonical effective routing target, also encoded inside the arguments.
Sourcepub fn snapshot_id(&self) -> Option<&[u8]>
pub fn snapshot_id(&self) -> Option<&[u8]>
Read exact raw load snapshot bytes, without backend token interpretation.
Sourcepub fn arguments(&self) -> &[u8] ⓘ
pub fn arguments(&self) -> &[u8] ⓘ
Read derived exact Candid bytes for a future qualified update-ingress transport.
Sourcepub const fn receiver(&self) -> &'static str
pub const fn receiver(&self) -> &'static str
Read the fixed management receiver; the effective routing target is separate.
Sourcepub fn digest(&self) -> ArtifactChecksumRecord
pub fn digest(&self) -> ArtifactChecksumRecord
Hash fixed receiver, effective target, update mode, exact method and Candid bytes.
Network/caller/intent/release/budgets stay outside this nonrecursive payload digest and are bound by the existing operation plan/attempt authority.
Sourcepub fn validate_mutation_binding(
&self,
binding: &OperationBindingRecord,
) -> Result<(), IcRequestError>
pub fn validate_mutation_binding( &self, binding: &OperationBindingRecord, ) -> Result<(), IcRequestError>
Check exact payload target/digest and mutation class against original declared binding.
This verifies bytes only; it does not authenticate the binding or admit dispatch.
§Errors
Rejects observation methods and changed target or request digest.
Sourcepub fn validate_observation_binding(
&self,
binding: &OperationBindingRecord,
request: &ArtifactChecksumRecord,
) -> Result<(), IcRequestError>
pub fn validate_observation_binding( &self, binding: &OperationBindingRecord, request: &ArtifactChecksumRecord, ) -> Result<(), IcRequestError>
Check an observation payload against its exact target and reserved observation digest.
The original binding still names the mutation. The observation digest is separately retained by the existing journal’s observation reservation.
§Errors
Rejects mutation methods, changed target or a different observation digest.