pub struct Biometric<R: Runtime>(/* private fields */);Expand description
Access to the biometric APIs.
Implementations§
Source§impl<R: Runtime> Biometric<R>
impl<R: Runtime> Biometric<R>
Sourcepub fn status(&self) -> Result<Status>
pub fn status(&self) -> Result<Status>
Checks the device’s availability and type of biometric authentication, as reported by the operating system. Errors if the underlying mobile plugin invocation fails.
Sourcepub fn authenticate(&self, reason: String, options: AuthOptions) -> Result<()>
pub fn authenticate(&self, reason: String, options: AuthOptions) -> Result<()>
Prompts the user for biometric authentication using the system UI (Android
BiometricPrompt or iOS LocalAuthentication), showing reason as the purpose of the
request. Resolves once the user is authenticated and errors if authentication fails, is
canceled, or the underlying mobile plugin invocation fails.
Auto Trait Implementations§
impl<R> !RefUnwindSafe for Biometric<R>
impl<R> !UnwindSafe for Biometric<R>
impl<R> Freeze for Biometric<R>where
PluginHandle<R>: Freeze,
impl<R> Send for Biometric<R>where
PluginHandle<R>: Send,
impl<R> Sync for Biometric<R>where
PluginHandle<R>: Sync,
impl<R> Unpin for Biometric<R>where
PluginHandle<R>: Unpin,
impl<R> UnsafeUnpin for Biometric<R>where
PluginHandle<R>: UnsafeUnpin,
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
Mutably borrows from an owned value. Read more