#[non_exhaustive]pub enum PivPinPolicy {
Default,
Never,
Once,
Always,
}Expand description
PIN access policy for PIV private key operations.
Standard PIV defines fixed PIN policies per slot (see PivSlot docs).
YubiKey extends this with per-key configurable policies.
§Standard references
- NIST SP 800-73-5 Part 2, §3.2: access rules per key reference
- Yubico PIV documentation: configurable PIN policies (vendor extension)
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.
Default
Use the slot’s default policy per NIST SP 800-73.
Never
No PIN required (vendor extension, not standard PIV).
Once
PIN verified once per session.
Always
PIN verified before every private key operation (“PIN Always”).
Trait Implementations§
Source§impl Clone for PivPinPolicy
impl Clone for PivPinPolicy
Source§fn clone(&self) -> PivPinPolicy
fn clone(&self) -> PivPinPolicy
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 PivPinPolicy
Source§impl Debug for PivPinPolicy
impl Debug for PivPinPolicy
Source§impl<'de> Deserialize<'de> for PivPinPolicy
impl<'de> Deserialize<'de> for PivPinPolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PivPinPolicy
Source§impl PartialEq for PivPinPolicy
impl PartialEq for PivPinPolicy
Source§fn eq(&self, other: &PivPinPolicy) -> bool
fn eq(&self, other: &PivPinPolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PivPinPolicy
impl Serialize for PivPinPolicy
impl StructuralPartialEq for PivPinPolicy
Auto Trait Implementations§
impl Freeze for PivPinPolicy
impl RefUnwindSafe for PivPinPolicy
impl Send for PivPinPolicy
impl Sync for PivPinPolicy
impl Unpin for PivPinPolicy
impl UnsafeUnpin for PivPinPolicy
impl UnwindSafe for PivPinPolicy
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