pub struct OwnedCredentialAttemptState { /* private fields */ }Expand description
Allocation-backed credential lifecycle for attempts that cross task boundaries.
Creating the state allocates one shared lineage. Beginning an attempt only clones that lineage and performs no new allocation.
Implementations§
Source§impl OwnedCredentialAttemptState
impl OwnedCredentialAttemptState
Sourcepub fn observe(&self) -> (CredentialAttemptGeneration, CredentialAttemptStatus)
pub fn observe(&self) -> (CredentialAttemptGeneration, CredentialAttemptStatus)
Returns the current generation and status.
Sourcepub fn begin(&self) -> Result<OwnedCredentialAttempt, CredentialAttemptError>
pub fn begin(&self) -> Result<OwnedCredentialAttempt, CredentialAttemptError>
Begins an owned attempt only when the current generation remains open.
Sourcepub fn validate(
&self,
attempt: &OwnedCredentialAttempt,
) -> Result<(), CredentialAttemptError>
pub fn validate( &self, attempt: &OwnedCredentialAttempt, ) -> Result<(), CredentialAttemptError>
Revalidates owner identity and generation immediately before use.
Sourcepub fn reject(
&self,
attempt: &OwnedCredentialAttempt,
) -> Result<(), CredentialAttemptError>
pub fn reject( &self, attempt: &OwnedCredentialAttempt, ) -> Result<(), CredentialAttemptError>
Closes the exact owned attempt generation after authentication rejection.
Sourcepub fn replace(
&self,
expected: CredentialAttemptGeneration,
) -> Result<CredentialAttemptGeneration, CredentialAttemptError>
pub fn replace( &self, expected: CredentialAttemptGeneration, ) -> Result<CredentialAttemptGeneration, CredentialAttemptError>
Opens a new generation after replacement credentials were admitted.
Sourcepub fn reconfirm(
&self,
expected: CredentialAttemptGeneration,
acknowledgement: CredentialReconfirmation,
) -> Result<CredentialAttemptGeneration, CredentialAttemptError>
pub fn reconfirm( &self, expected: CredentialAttemptGeneration, acknowledgement: CredentialReconfirmation, ) -> Result<CredentialAttemptGeneration, CredentialAttemptError>
Opens a new generation after explicit unchanged-credential confirmation.
Trait Implementations§
Source§impl Debug for OwnedCredentialAttemptState
impl Debug for OwnedCredentialAttemptState
Auto Trait Implementations§
impl Freeze for OwnedCredentialAttemptState
impl RefUnwindSafe for OwnedCredentialAttemptState
impl Send for OwnedCredentialAttemptState
impl Sync for OwnedCredentialAttemptState
impl Unpin for OwnedCredentialAttemptState
impl UnsafeUnpin for OwnedCredentialAttemptState
impl UnwindSafe for OwnedCredentialAttemptState
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