Skip to main content

BiometricService

Trait BiometricService 

Source
pub trait BiometricService {
    // Required methods
    fn availability(&self) -> Biometry;
    fn authenticate(
        &mut self,
        reason: &str,
        allow_device_credential: bool,
        done: Box<dyn FnOnce(BiometricResult) + Send>,
    );
}
Expand description

A biometria do aparelho (digital, rosto; o Windows Hello). done recebe o resultado, de qualquer thread.

Required Methods§

Source

fn availability(&self) -> Biometry

Source

fn authenticate( &mut self, reason: &str, allow_device_credential: bool, done: Box<dyn FnOnce(BiometricResult) + Send>, )

Pede a verificação mostrando reason. Com allow_device_credential, o PIN ou o padrão do aparelho também valem.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§