#[non_exhaustive]pub enum InvalidKeyError {
InvalidKeySize {
expected: usize,
actual: usize,
context: &'static str,
},
MissingParameter(&'static str),
InconsistentParameters(String),
InvalidParameter {
name: &'static str,
reason: String,
},
InvalidOtherPrime {
index: usize,
source: Box<InvalidKeyError>,
},
}Expand description
The JWK is malformed.
These errors indicate the key material or metadata is invalid regardless
of how the key is used. A key producing an InvalidKeyError should be
rejected entirely.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidKeySize
Invalid key size for the key type or curve.
Fields
MissingParameter(&'static str)
Missing required parameter for key type.
InconsistentParameters(String)
Inconsistent key parameters (e.g., public and private parts don’t match).
InvalidParameter
Invalid parameter value.
InvalidOtherPrime
Invalid oth entry in multi-prime RSA parameters.
Fields
§
source: Box<InvalidKeyError>Validation error for this entry.
Trait Implementations§
Source§impl Clone for InvalidKeyError
impl Clone for InvalidKeyError
Source§fn clone(&self) -> InvalidKeyError
fn clone(&self) -> InvalidKeyError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InvalidKeyError
impl Debug for InvalidKeyError
Source§impl Display for InvalidKeyError
impl Display for InvalidKeyError
Source§impl Error for InvalidKeyError
impl Error for InvalidKeyError
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()
Source§impl From<InvalidKeyError> for Error
impl From<InvalidKeyError> for Error
Source§fn from(e: InvalidKeyError) -> Self
fn from(e: InvalidKeyError) -> Self
Converts to this type from the input type.
Source§impl From<InvalidKeyError> for JwtSimpleKeyConversionError
Available on crate feature jwt-simple only.
impl From<InvalidKeyError> for JwtSimpleKeyConversionError
Available on crate feature
jwt-simple only.Source§fn from(e: InvalidKeyError) -> Self
fn from(e: InvalidKeyError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for InvalidKeyError
impl PartialEq for InvalidKeyError
impl Eq for InvalidKeyError
impl StructuralPartialEq for InvalidKeyError
Auto Trait Implementations§
impl Freeze for InvalidKeyError
impl RefUnwindSafe for InvalidKeyError
impl Send for InvalidKeyError
impl Sync for InvalidKeyError
impl Unpin for InvalidKeyError
impl UnsafeUnpin for InvalidKeyError
impl UnwindSafe for InvalidKeyError
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.