pub enum OtpError {
NotFound,
Expired {
expired_at: String,
},
UsageLimitExceeded {
max_uses: u32,
},
Revoked,
GenerationError(String),
StorageError(String),
}Expand description
Errors produced by OTP operations.
Variants§
NotFound
The supplied OTP token was not found in the store.
Expired
The OTP has expired.
UsageLimitExceeded
The OTP has exceeded its maximum usage count.
Revoked
The OTP has been explicitly revoked by an administrator.
GenerationError(String)
Cryptographic or RNG error during token generation.
StorageError(String)
Storage backend error.
Trait Implementations§
Source§impl Error for OtpError
impl Error for OtpError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for OtpError
impl RefUnwindSafe for OtpError
impl Send for OtpError
impl Sync for OtpError
impl Unpin for OtpError
impl UnsafeUnpin for OtpError
impl UnwindSafe for OtpError
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