pub struct OastCorrelation { /* private fields */ }Expand description
One exact registration and its bounded correlation state.
Implementations§
Source§impl OastCorrelation
impl OastCorrelation
Sourcepub fn binding_id(&self) -> &OastBindingId
pub fn binding_id(&self) -> &OastBindingId
Returns the binding identity.
Sourcepub fn correlation_id(&self) -> &OastCorrelationId
pub fn correlation_id(&self) -> &OastCorrelationId
Returns the correlation identity.
Sourcepub fn assessment_id(&self) -> &OastAssessmentId
pub fn assessment_id(&self) -> &OastAssessmentId
Returns the exact assessment identity.
Sourcepub fn verification_case(&self) -> &VerificationCase
pub fn verification_case(&self) -> &VerificationCase
Returns the complete verification case.
Sourcepub const fn allowed_protocols(&self) -> OastProtocolSet
pub const fn allowed_protocols(&self) -> OastProtocolSet
Returns the protocol grant.
Sourcepub const fn issued_at(&self) -> OastMonotonicTime
pub const fn issued_at(&self) -> OastMonotonicTime
Returns registration time.
Sourcepub const fn expires_at(&self) -> OastMonotonicTime
pub const fn expires_at(&self) -> OastMonotonicTime
Returns exclusive expiry.
Sourcepub const fn state(&self) -> OastCorrelationState
pub const fn state(&self) -> OastCorrelationState
Returns the lifecycle state.
Sourcepub fn terminal_receipt(&self) -> Option<OastTerminalReceipt>
pub fn terminal_receipt(&self) -> Option<OastTerminalReceipt>
Returns a typed terminal receipt after cancellation or observed expiry.
Sourcepub const fn poll_limit(&self) -> u16
pub const fn poll_limit(&self) -> u16
Returns the original poll grant.
Sourcepub const fn remaining_polls(&self) -> u16
pub const fn remaining_polls(&self) -> u16
Returns unspent polls.
Sourcepub fn unique_events(&self) -> usize
pub fn unique_events(&self) -> usize
Returns committed unique keys.
Sourcepub const fn accepted_events(&self) -> u16
pub const fn accepted_events(&self) -> u16
Returns committed accepted-event count.
Sourcepub const fn duplicate_events(&self) -> u16
pub const fn duplicate_events(&self) -> u16
Returns committed duplicate count.
Sourcepub const fn abandoned_polls(&self) -> u16
pub const fn abandoned_polls(&self) -> u16
Returns permits dropped or consumed by a failed atomic completion.
Sourcepub fn cancel(
&mut self,
assessment_id: &OastAssessmentId,
verification_case: &VerificationCase,
now: OastMonotonicTime,
) -> Result<OastTerminalReceipt, OastError>
pub fn cancel( &mut self, assessment_id: &OastAssessmentId, verification_case: &VerificationCase, now: OastMonotonicTime, ) -> Result<OastTerminalReceipt, OastError>
Cancels an active registration after exact binding validation.
Sourcepub fn begin_poll<'a>(
&'a mut self,
assessment_id: &OastAssessmentId,
verification_case: &VerificationCase,
now: OastMonotonicTime,
) -> Result<OastPollPermit<'a>, OastError>
pub fn begin_poll<'a>( &'a mut self, assessment_id: &OastAssessmentId, verification_case: &VerificationCase, now: OastMonotonicTime, ) -> Result<OastPollPermit<'a>, OastError>
Spends one poll and returns a move-only exclusive permit.
Binding, state, time, expiry, and budget checks occur before the poll is spent. Dropping a permit never refunds the poll.