pub struct ReplayToken { /* private fields */ }Expand description
Opaque one-use continuation after request authentication.
Implementations§
Source§impl ReplayToken
impl ReplayToken
Sourcepub fn admit(self, decision: ReplayDecision) -> Result<OpenedRequest, Error>
pub fn admit(self, decision: ReplayDecision) -> Result<OpenedRequest, Error>
Apply one atomic replay decision before its deadline, then release the authenticated request.
§Errors
Returns Error::ReplayDecisionMismatch when the decision belongs to a
different request, Error::ReplayRejected when the provider denies
admission, Error::InvalidRequestTime when admission completes after
the authenticated deadline, or Error::ClockUnavailable when the
platform clock cannot be read.
Sourcepub fn admit_at(
self,
decision: ReplayDecision,
now_unix_s: u64,
) -> Result<OpenedRequest, Error>
pub fn admit_at( self, decision: ReplayDecision, now_unix_s: u64, ) -> Result<OpenedRequest, Error>
Apply one replay decision at a caller-supplied trusted Unix time.
This entry point exists for hosts with their own trusted clock and for
deterministic conformance tests. Normal native callers use Self::admit.
§Errors
Returns the same decision, freshness, and clock-independent errors as
Self::admit.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ReplayToken
impl RefUnwindSafe for ReplayToken
impl Send for ReplayToken
impl Sync for ReplayToken
impl Unpin for ReplayToken
impl UnsafeUnpin for ReplayToken
impl UnwindSafe for ReplayToken
Blanket Implementations§
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