#[repr(C)]pub enum BiometricResult {
Authenticated = 0,
Failed = 1,
Cancelled = 2,
FellBackToPasscode = 3,
Unavailable = 4,
Error = 5,
}Expand description
The outcome of one request_biometric_auth attempt, delivered to the
caller’s completion callback once the OS prompt resolves.
Maps onto every platform’s result enum: iOS LAError, Android
BiometricPrompt.AuthenticationCallback, Windows
UserConsentVerificationResult, Linux polkit / PAM (research/02 §6).
Variants§
Authenticated = 0
The user matched their face / finger / iris. Unlock granted.
Failed = 1
The user presented a biometric but it did not match (wrong
finger / face). Distinct from Cancelled — the prompt is still
up or retries were exhausted without a deliberate cancel.
Cancelled = 2
The user dismissed the prompt (tapped Cancel / pressed back).
FellBackToPasscode = 3
Biometrics failed but the user authenticated via the OS passcode
/ PIN / device-credential fallback. Still a successful unlock —
only delivered when BiometricPrompt::allow_device_credential
was set.
No usable biometric is enrolled / available on this device, so
the prompt could not be shown (Linux degraded path, or hardware
absent). Pairs with BiometricKind::NotAvailable.
Error = 5
A platform error occurred (sensor busy, lockout, key invalidated, or an unmapped native error code).
Implementations§
Source§impl BiometricResult
impl BiometricResult
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
true when the user successfully unlocked — either by biometric
match (Authenticated) or by the OS passcode fallback
(FellBackToPasscode). The vault gate keys off this.
Trait Implementations§
Source§impl Clone for BiometricResult
impl Clone for BiometricResult
Source§fn clone(&self) -> BiometricResult
fn clone(&self) -> BiometricResult
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 BiometricResult
impl Debug for BiometricResult
Source§impl Hash for BiometricResult
impl Hash for BiometricResult
Source§impl Ord for BiometricResult
impl Ord for BiometricResult
Source§fn cmp(&self, other: &BiometricResult) -> Ordering
fn cmp(&self, other: &BiometricResult) -> 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 BiometricResult
impl PartialEq for BiometricResult
Source§fn eq(&self, other: &BiometricResult) -> bool
fn eq(&self, other: &BiometricResult) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for BiometricResult
impl PartialOrd for BiometricResult
impl Copy for BiometricResult
impl Eq for BiometricResult
impl StructuralPartialEq for BiometricResult
Auto Trait Implementations§
impl Freeze for BiometricResult
impl RefUnwindSafe for BiometricResult
impl Send for BiometricResult
impl Sync for BiometricResult
impl Unpin for BiometricResult
impl UnsafeUnpin for BiometricResult
impl UnwindSafe for BiometricResult
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