#[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 fn is_available(&self) -> bool
pub 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 moreSource§impl Debug for BiometricKind
impl Debug for BiometricKind
Source§impl Default for BiometricKind
impl Default for BiometricKind
Source§impl Hash for BiometricKind
impl Hash for BiometricKind
Source§impl Ord for BiometricKind
impl Ord for BiometricKind
Source§fn cmp(&self, other: &BiometricKind) -> Ordering
fn cmp(&self, other: &BiometricKind) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for BiometricKind
impl PartialEq for BiometricKind
Source§fn eq(&self, other: &BiometricKind) -> bool
fn eq(&self, other: &BiometricKind) -> bool
self and other values to be equal, and is used by ==.