#[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 ==.