pub struct OastCorrelationAuthority { /* private fields */ }Expand description
Bounded token-reuse authority for one explicit epoch.
Token fingerprints remain reserved until this value is dropped, including after registrations cancel or expire. This type intentionally has no Default implementation.
Implementations§
Source§impl OastCorrelationAuthority
impl OastCorrelationAuthority
Sourcepub fn new(
epoch: OastAuthorityEpoch,
assessment_id: OastAssessmentId,
limits: OastAuthorityLimits,
) -> Self
pub fn new( epoch: OastAuthorityEpoch, assessment_id: OastAssessmentId, limits: OastAuthorityLimits, ) -> Self
Starts an isolated authority epoch with explicit bounds.
Sourcepub fn epoch(&self) -> &OastAuthorityEpoch
pub fn epoch(&self) -> &OastAuthorityEpoch
Returns the epoch identity.
Sourcepub fn assessment_id(&self) -> &OastAssessmentId
pub fn assessment_id(&self) -> &OastAssessmentId
Returns the exact assessment identity bound to this epoch.
Sourcepub const fn limits(&self) -> OastAuthorityLimits
pub const fn limits(&self) -> OastAuthorityLimits
Returns the configured bounds.
Sourcepub const fn registered(&self) -> u16
pub const fn registered(&self) -> u16
Returns the number of tokens consumed in this epoch.
Sourcepub fn register(
&mut self,
verification_case: VerificationCase,
token: OastCorrelationToken,
allowed_protocols: OastProtocolSet,
issued_at: OastMonotonicTime,
lifetime: OastLifetime,
poll_budget: OastPollBudget,
) -> Result<(OastCorrelation, OastRegistrationReceipt), OastError>
pub fn register( &mut self, verification_case: VerificationCase, token: OastCorrelationToken, allowed_protocols: OastProtocolSet, issued_at: OastMonotonicTime, lifetime: OastLifetime, poll_budget: OastPollBudget, ) -> Result<(OastCorrelation, OastRegistrationReceipt), OastError>
Consumes a token and creates one exact bounded registration.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OastCorrelationAuthority
impl RefUnwindSafe for OastCorrelationAuthority
impl Send for OastCorrelationAuthority
impl Sync for OastCorrelationAuthority
impl Unpin for OastCorrelationAuthority
impl UnsafeUnpin for OastCorrelationAuthority
impl UnwindSafe for OastCorrelationAuthority
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more