pub struct IcObservationRequest<'a> { /* private fields */ }Expand description
Structural binding to an original pending mutation and its reserved IC observation.
Retain original observation bytes before reserving their existing payload digest. This request neither spends nor proves dispatch custody, fresh read permission, authentication or effect attribution. Recovery never permits repeating a lost call.
Implementations§
Source§impl<'a> IcObservationRequest<'a>
impl<'a> IcObservationRequest<'a>
Sourcepub fn new(
plan: &'a OperationPlanRecord,
operation_sequence: u64,
journal: &AttemptJournalRecord,
mutation: &'a IcManagementRequestRecord,
payload: &'a IcManagementRequestRecord,
) -> Result<Self, IcObservationRequestError>
pub fn new( plan: &'a OperationPlanRecord, operation_sequence: u64, journal: &AttemptJournalRecord, mutation: &'a IcManagementRequestRecord, payload: &'a IcManagementRequestRecord, ) -> Result<Self, IcObservationRequestError>
Bind original mutation bytes and exact already reserved status/list bytes.
Both payloads must name the same original target. Observation identity reuses the existing IC payload digest; no second hash or journal owner is introduced.
§Errors
Rejects changed authority/payloads or missing original pending reservations.
Sourcepub const fn plan(&self) -> &OperationPlanRecord
pub const fn plan(&self) -> &OperationPlanRecord
Read the full original context, inventory and selection.
Sourcepub const fn mutation(&self) -> &'a IcManagementRequestRecord
pub const fn mutation(&self) -> &'a IcManagementRequestRecord
Read the exact original mutation, never an executable retry.
Sourcepub const fn payload(&self) -> &'a IcManagementRequestRecord
pub const fn payload(&self) -> &'a IcManagementRequestRecord
Read exact observation receiver, routing target, method and Candid bytes.
Read the original operation authority and immutable attempt limits.
Sourcepub const fn mutation_attempt(&self) -> u32
pub const fn mutation_attempt(&self) -> u32
Read the original unresolved mutation attempt.
Sourcepub const fn observation_attempt(&self) -> u32
pub const fn observation_attempt(&self) -> u32
Read the original already consumed observation attempt.
Sourcepub fn validate_journal(
&self,
journal: &AttemptJournalRecord,
) -> Result<(), IcObservationRequestError>
pub fn validate_journal( &self, journal: &AttemptJournalRecord, ) -> Result<(), IcObservationRequestError>
Recheck current exact reservations and original observation bytes without IO.
§Errors
Rejects changed authority, settled/replaced attempts or different reserved bytes.