pub enum OneTimeSecretState {
Empty,
Pending,
Expired,
Consumed,
}Expand description
Lifecycle of a OneTimeSecret slot.
Returned by OneTimeSecret::state so callers can distinguish “never
issued” from “already used” and “timed out” — the difference between a 401
and a 410 for an installation or password-reset endpoint.
Variants§
Empty
Nothing has been issued (new store, or after OneTimeSecret::revoke).
Pending
A secret is issued and can still be consumed.
Expired
The secret is beyond its TTL and can no longer be consumed.
Consumed
The secret was consumed; it cannot be consumed again.
Trait Implementations§
Source§impl Clone for OneTimeSecretState
impl Clone for OneTimeSecretState
Source§fn clone(&self) -> OneTimeSecretState
fn clone(&self) -> OneTimeSecretState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for OneTimeSecretState
Source§impl Debug for OneTimeSecretState
impl Debug for OneTimeSecretState
impl Eq for OneTimeSecretState
Source§impl Hash for OneTimeSecretState
impl Hash for OneTimeSecretState
Source§impl PartialEq for OneTimeSecretState
impl PartialEq for OneTimeSecretState
impl StructuralPartialEq for OneTimeSecretState
Auto Trait Implementations§
impl Forget for OneTimeSecretState
impl Freeze for OneTimeSecretState
impl Move for OneTimeSecretState
impl RefUnwindSafe for OneTimeSecretState
impl Send for OneTimeSecretState
impl Sync for OneTimeSecretState
impl Unpin for OneTimeSecretState
impl UnsafeUnpin for OneTimeSecretState
impl UnwindSafe for OneTimeSecretState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.