#[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§fn default() -> BiometricKind
fn default() -> 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 ==.Source§impl PartialOrd for BiometricKind
impl PartialOrd for BiometricKind
impl Copy for BiometricKind
impl Eq for BiometricKind
impl StructuralPartialEq for BiometricKind
Auto Trait Implementations§
impl Freeze for BiometricKind
impl RefUnwindSafe for BiometricKind
impl Send for BiometricKind
impl Sync for BiometricKind
impl Unpin for BiometricKind
impl UnsafeUnpin for BiometricKind
impl UnwindSafe for BiometricKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more