Enum itsdangerous::BadTimedSignature
source · [−]pub enum BadTimedSignature<'a> {
SeparatorNotFound {
separator: Separator,
},
SignatureMismatch {
signature: &'a str,
value: &'a str,
},
PayloadInvalid {
value: &'a str,
error: PayloadError,
},
TimestampMissing {
value: &'a str,
},
TimestampInvalid {
timestamp: &'a str,
},
TimestampExpired {
timestamp: SystemTime,
max_age: Duration,
value: &'a str,
},
}
Expand description
Errors that can occur while unsigning a “signed value” using the timed signer.
Variants
SeparatorNotFound
Fields
separator: Separator
A string was provided to unsign, but it did not contain the expected separator.
SignatureMismatch
The signature did not match what we expected it to be.
PayloadInvalid
The payload is invalid, e.g. it cannot be parsed.
TimestampMissing
Fields
value: &'a str
The timestamp is missing, but the value was signed with a correct secret key + salt.
TimestampInvalid
Fields
timestamp: &'a str
The timestamp was present and signed, but we weren’t able to parse it back to a SystemTime.
TimestampExpired
The timestamp expired - meaning that it was more than max_age
ago.
Trait Implementations
sourceimpl<'a> Debug for BadTimedSignature<'a>
impl<'a> Debug for BadTimedSignature<'a>
sourceimpl<'a> Display for BadTimedSignature<'a>
impl<'a> Display for BadTimedSignature<'a>
sourceimpl<'a> Error for BadTimedSignature<'a>
impl<'a> Error for BadTimedSignature<'a>
sourcefn description(&self) -> &str
fn description(&self) -> &str
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
sourcefn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎 Deprecated since 1.33.0:
replaced by Error::source, which can support downcasting
sourceimpl<'a> From<BadSignature<'a>> for BadTimedSignature<'a>
impl<'a> From<BadSignature<'a>> for BadTimedSignature<'a>
sourcefn from(bad_signature: BadSignature<'a>) -> Self
fn from(bad_signature: BadSignature<'a>) -> Self
Performs the conversion.
Auto Trait Implementations
impl<'a> RefUnwindSafe for BadTimedSignature<'a>
impl<'a> Send for BadTimedSignature<'a>
impl<'a> Sync for BadTimedSignature<'a>
impl<'a> Unpin for BadTimedSignature<'a>
impl<'a> UnwindSafe for BadTimedSignature<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more