#[non_exhaustive]pub struct KeyFilter<'a> {
pub op: Option<KeyOperation>,
pub alg: Option<Algorithm>,
pub kid: Option<&'a str>,
pub kty: Option<KeyType>,
pub key_use: Option<KeyUse>,
}Expand description
Discovery filter criteria.
§Construction
This type is #[non_exhaustive]. External callers must use KeyFilter::new
plus builder methods, or convenience constructors such as
KeyFilter::for_alg. Struct-literal syntax will not compile outside this crate.
Public fields remain readable for inspection/pattern-matching, but builder methods are the only supported external construction path.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.op: Option<KeyOperation>Optional operation-intent filter.
alg: Option<Algorithm>Optional algorithm filter (exact alg match only).
kid: Option<&'a str>Optional key identifier filter.
kty: Option<KeyType>Optional key-type filter.
key_use: Option<KeyUse>Optional key-use filter.
Implementations§
Source§impl<'a> KeyFilter<'a>
impl<'a> KeyFilter<'a>
Sourcepub fn for_op(op: KeyOperation) -> Self
pub fn for_op(op: KeyOperation) -> Self
Creates a filter for a specific operation intent.
Sourcepub fn for_use_alg(key_use: KeyUse, alg: Algorithm) -> Self
pub fn for_use_alg(key_use: KeyUse, alg: Algorithm) -> Self
Creates a filter for key use + exact algorithm.
Sourcepub fn for_op_alg(op: KeyOperation, alg: Algorithm) -> Self
pub fn for_op_alg(op: KeyOperation, alg: Algorithm) -> Self
Creates a filter for operation intent + exact algorithm.
Sourcepub fn with_op(self, op: KeyOperation) -> Self
pub fn with_op(self, op: KeyOperation) -> Self
Sets an operation filter.
Sourcepub fn with_key_use(self, key_use: KeyUse) -> Self
pub fn with_key_use(self, key_use: KeyUse) -> Self
Sets a key use filter.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for KeyFilter<'a>
impl<'a> RefUnwindSafe for KeyFilter<'a>
impl<'a> Send for KeyFilter<'a>
impl<'a> Sync for KeyFilter<'a>
impl<'a> Unpin for KeyFilter<'a>
impl<'a> UnsafeUnpin for KeyFilter<'a>
impl<'a> UnwindSafe for KeyFilter<'a>
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