#[repr(C)]pub enum BiometricKind {
NotAvailable = 0,
Fingerprint = 1,
Face = 2,
Iris = 3,
}Expand description
What biometric hardware the device can authenticate with right now.
This is the sync availability probe (iOS LAContext.biometryType /
canEvaluatePolicy; Android BiometricManager.canAuthenticate), not
the outcome of an auth attempt — that is BiometricResult.
NotAvailable covers “no sensor”, “not enrolled”, and “disabled by
policy” alike; callers that need to distinguish those use the richer
per-attempt BiometricResult variants.
Variants§
NotAvailable = 0
No usable biometric sensor (absent, unenrolled, or disabled).
Fingerprint = 1
Fingerprint reader (Touch ID, Android fingerprint, Windows Hello fingerprint).
Face = 2
Face recognition (Face ID, Android face unlock, Windows Hello face).
Iris = 3
Iris scanner (Samsung legacy, some Android OEMs).
Implementations§
Source§impl BiometricKind
impl BiometricKind
Sourcepub const fn is_available(&self) -> bool
pub const fn is_available(&self) -> bool
true for any real sensor — i.e. anything except NotAvailable.
Lets the demo gate decide whether to even offer a biometric unlock.
Trait Implementations§
Source§impl Clone for BiometricKind
impl Clone for BiometricKind
Source§fn clone(&self) -> BiometricKind
fn clone(&self) -> BiometricKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more