#[non_exhaustive]pub enum KeyMatchStrength {
ByKeyId,
ByAlgorithm,
}Expand description
States how well a particular key matched the selection criteria from a JOSE header.
Used by both JWS verifiers and JWE ciphers to express the strength of a key match, allowing multi-key types to prefer exact matches over algorithm-only matches.
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.
ByKeyId
Both the algorithm and the key ID match exactly.
ByAlgorithm
The algorithm matches but the key ID was not used for matching — either
the header has no kid, or this key has no kid registered.
Trait Implementations§
Source§impl Clone for KeyMatchStrength
impl Clone for KeyMatchStrength
Source§fn clone(&self) -> KeyMatchStrength
fn clone(&self) -> KeyMatchStrength
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for KeyMatchStrength
Source§impl Debug for KeyMatchStrength
impl Debug for KeyMatchStrength
impl Eq for KeyMatchStrength
Source§impl PartialEq for KeyMatchStrength
impl PartialEq for KeyMatchStrength
impl StructuralPartialEq for KeyMatchStrength
Auto Trait Implementations§
impl Freeze for KeyMatchStrength
impl RefUnwindSafe for KeyMatchStrength
impl Send for KeyMatchStrength
impl Sync for KeyMatchStrength
impl Unpin for KeyMatchStrength
impl UnsafeUnpin for KeyMatchStrength
impl UnwindSafe for KeyMatchStrength
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