#[non_exhaustive]pub enum AlgorithmError {
#[non_exhaustive] Unsigned {
name: String,
},
#[non_exhaustive] Hmac {
name: String,
},
#[non_exhaustive] Unsupported {
name: String,
supported: String,
},
}Expand description
Why parse_algorithm refused a name.
Display spells out the reason, quoting the refused value; it is what
crate::OAuthConfig::resolve puts in its problem list.
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.
#[non_exhaustive]Unsigned
none, in any case: an unsigned token.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]Hmac
HS256, HS384 or HS512: verification with a shared secret.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]Unsupported
Anything else that is not a JWS algorithm this crate can verify
(including ES512, which the underlying ring cannot, and a name in
the wrong case).
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§
supported: StringDEFAULT_ALGORITHMS, comma-separated.
Trait Implementations§
Source§impl Clone for AlgorithmError
impl Clone for AlgorithmError
Source§impl Debug for AlgorithmError
impl Debug for AlgorithmError
Source§impl Display for AlgorithmError
impl Display for AlgorithmError
impl Eq for AlgorithmError
Source§impl Error for AlgorithmError
impl Error for AlgorithmError
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()
Source§impl PartialEq for AlgorithmError
impl PartialEq for AlgorithmError
impl StructuralPartialEq for AlgorithmError
Auto Trait Implementations§
impl Freeze for AlgorithmError
impl RefUnwindSafe for AlgorithmError
impl Send for AlgorithmError
impl Sync for AlgorithmError
impl Unpin for AlgorithmError
impl UnsafeUnpin for AlgorithmError
impl UnwindSafe for AlgorithmError
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