Skip to main content

IcObservationRequest

Struct IcObservationRequest 

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

Source

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.

Source

pub const fn plan(&self) -> &OperationPlanRecord

Read the full original context, inventory and selection.

Source

pub const fn mutation(&self) -> &'a IcManagementRequestRecord

Read the exact original mutation, never an executable retry.

Source

pub const fn payload(&self) -> &'a IcManagementRequestRecord

Read exact observation receiver, routing target, method and Candid bytes.

Source

pub const fn authority(&self) -> &AttemptAuthorityRecord

Read the original operation authority and immutable attempt limits.

Source

pub const fn mutation_attempt(&self) -> u32

Read the original unresolved mutation attempt.

Source

pub const fn observation_attempt(&self) -> u32

Read the original already consumed observation attempt.

Source

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.

Trait Implementations§

Source§

impl<'a> Debug for IcObservationRequest<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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.