#[non_exhaustive]pub enum JwtSimpleKeyConversionError {
InvalidKey(InvalidKeyError),
IncompatibleKey(IncompatibleKeyError),
KeyTypeMismatch {
expected: &'static str,
actual: String,
},
CurveMismatch {
expected: &'static str,
actual: String,
},
MissingComponent {
field: &'static str,
},
MissingPrivateKey,
Core(Error),
Encoding(String),
Import(String),
}Available on crate feature
jwt-simple only.Expand description
Errors that occur when converting a JWK into a jwt-simple key type.
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.
InvalidKey(InvalidKeyError)
The JWK itself is malformed.
IncompatibleKey(IncompatibleKeyError)
The JWK is valid but unsuitable for the requested conversion.
KeyTypeMismatch
The conversion expects a different JWK key type.
CurveMismatch
The conversion expects a different curve.
MissingComponent
The conversion requires a specific JWK member that is absent.
MissingPrivateKey
The conversion requires private key material, but the JWK is public-only.
Core(Error)
Core JWK/JWKS validation failed before conversion.
Encoding(String)
Encoding the source key into an intermediate representation failed.
Import(String)
Importing the encoded key into jwt-simple failed.
Trait Implementations§
Source§impl Debug for JwtSimpleKeyConversionError
impl Debug for JwtSimpleKeyConversionError
Source§impl Error for JwtSimpleKeyConversionError
impl Error for JwtSimpleKeyConversionError
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<IncompatibleKeyError> for JwtSimpleKeyConversionError
impl From<IncompatibleKeyError> for JwtSimpleKeyConversionError
Source§fn from(e: IncompatibleKeyError) -> Self
fn from(e: IncompatibleKeyError) -> Self
Converts to this type from the input type.
Source§impl From<InvalidKeyError> for JwtSimpleKeyConversionError
impl From<InvalidKeyError> for JwtSimpleKeyConversionError
Source§fn from(e: InvalidKeyError) -> Self
fn from(e: InvalidKeyError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for JwtSimpleKeyConversionError
impl !RefUnwindSafe for JwtSimpleKeyConversionError
impl Send for JwtSimpleKeyConversionError
impl Sync for JwtSimpleKeyConversionError
impl Unpin for JwtSimpleKeyConversionError
impl UnsafeUnpin for JwtSimpleKeyConversionError
impl !UnwindSafe for JwtSimpleKeyConversionError
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> 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.