#[repr(C)]pub struct BiometricPrompt {
pub reason: AzString,
pub cancel_label: AzString,
pub allow_device_credential: bool,
}Expand description
Configuration for one biometric-auth request — what the OS prompt
shows and which fallbacks are allowed. Passed to
App::request_biometric_auth.
Strings are plain AzString; an empty string means “use the
platform default label” (so callers only override what they care
about). This keeps the public surface engine-agnostic and codegen
stays a single struct with no nested Option<String> wrappers.
Fields§
§reason: AzStringReason shown in the OS prompt — required on iOS
(localizedReason; the NSFaceIDUsageDescription plist key is
declared separately), shown as the Android subtitle and the
Windows / Linux message line. Empty is accepted but discouraged.
cancel_label: AzStringLabel for the cancel / negative button (Android requires one;
iOS localizedCancelTitle). Empty → platform default (“Cancel”).
allow_device_credential: boolAllow the OS passcode / PIN / device-credential fallback when
biometrics fail or aren’t enrolled. When the user takes that
path the result is BiometricResult::FellBackToPasscode.
false = biometric-only (iOS …WithBiometrics, Android
BIOMETRIC_STRONG without DEVICE_CREDENTIAL).
Implementations§
Source§impl BiometricPrompt
impl BiometricPrompt
Sourcepub fn new(reason: AzString) -> BiometricPrompt
pub fn new(reason: AzString) -> BiometricPrompt
Convenience constructor: a biometric-only prompt showing reason,
with the platform-default cancel label and no passcode fallback.
Trait Implementations§
Source§impl Clone for BiometricPrompt
impl Clone for BiometricPrompt
Source§fn clone(&self) -> BiometricPrompt
fn clone(&self) -> BiometricPrompt
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 BiometricPrompt
impl Debug for BiometricPrompt
Source§impl Default for BiometricPrompt
impl Default for BiometricPrompt
Source§fn default() -> BiometricPrompt
fn default() -> BiometricPrompt
Source§impl PartialEq for BiometricPrompt
impl PartialEq for BiometricPrompt
Source§fn eq(&self, other: &BiometricPrompt) -> bool
fn eq(&self, other: &BiometricPrompt) -> bool
self and other values to be equal, and is used by ==.impl Eq for BiometricPrompt
impl StructuralPartialEq for BiometricPrompt
Auto Trait Implementations§
impl Freeze for BiometricPrompt
impl RefUnwindSafe for BiometricPrompt
impl Send for BiometricPrompt
impl Sync for BiometricPrompt
impl Unpin for BiometricPrompt
impl UnsafeUnpin for BiometricPrompt
impl UnwindSafe for BiometricPrompt
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> 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