pub struct KeySet { /* private fields */ }Expand description
Decoded key set indexed by kid. Immutable; a refresh builds a new one.
Implementations§
Source§impl KeySet
impl KeySet
Sourcepub fn from_doc(doc: JwksDoc) -> Result<Self, JwksError>
pub fn from_doc(doc: JwksDoc) -> Result<Self, JwksError>
Decode a JWKS doc. Non-Ed25519 entries are skipped; a doc with zero
usable keys is JwksError::Parse — there is nothing to verify with.
pub fn get(&self, kid: &str) -> Option<&KeyEntry>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn doc(&self) -> &JwksDoc
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KeySet
impl RefUnwindSafe for KeySet
impl Send for KeySet
impl Sync for KeySet
impl Unpin for KeySet
impl UnsafeUnpin for KeySet
impl UnwindSafe for KeySet
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