#[non_exhaustive]pub enum Error {
Show 14 variants
Json(Error),
Parse(ParseError),
InvalidUrl(ParseError),
InvalidUrlScheme(&'static str),
InvalidKey(InvalidKeyError),
IncompatibleKey(IncompatibleKeyError),
Base64(Error),
InvalidInput(&'static str),
Http(Error),
Fetch(String),
Cache(String),
Other(String),
UnsupportedForWebCrypto {
reason: &'static str,
},
WebCrypto(String),
}Expand description
The main error type for core JWK/JWKS operations.
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.
Json(Error)
Failed to parse JSON syntax or structure.
Parse(ParseError)
Failed to interpret valid JSON as JWK/JWKS data.
InvalidUrl(ParseError)
Invalid URL input.
InvalidUrlScheme(&'static str)
URL violates a crate-level policy requirement.
InvalidKey(InvalidKeyError)
The JWK is malformed: missing parameters, invalid encoding, or inconsistent fields.
IncompatibleKey(IncompatibleKeyError)
The JWK is well-formed but incompatible with the requested use.
Base64(Error)
Base64 decoding failed.
InvalidInput(&'static str)
Caller provided invalid input to a public API.
Http(Error)
Available on crate feature
http only.HTTP request error.
Fetch(String)
Remote fetch or transport failed outside the reqwest backend.
Cache(String)
Cache operation failed.
Other(String)
Other error (for platform-specific or miscellaneous errors).
UnsupportedForWebCrypto
Available on crate feature
web-crypto only.Key type or curve not supported by WebCrypto.
WebCrypto(String)
Available on crate feature
web-crypto only.WebCrypto operation failed.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 Error
impl From<IncompatibleKeyError> for Error
Source§fn from(e: IncompatibleKeyError) -> Self
fn from(e: IncompatibleKeyError) -> Self
Converts to this type from the input type.
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<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(e: ParseError) -> Self
fn from(e: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe for Error
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.