chore: update documentation

This commit is contained in:
Lucas Nogueira
2026-09-22 11:30:47 -03:00
parent d869c162a7
commit a87a3c7d44
104 changed files with 4875 additions and 222 deletions
+13
View File
@@ -4,6 +4,7 @@
use serde::{Deserialize, Serialize};
/// Options for [`Biometric::authenticate`](crate::Biometric::authenticate).
#[derive(Debug, Default, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct AuthOptions {
@@ -21,19 +22,31 @@ pub struct AuthOptions {
pub confirmation_required: Option<bool>,
}
/// The kind of biometry hardware detected on the device.
#[derive(Debug, Clone, serde_repr::Deserialize_repr)]
#[repr(u8)]
pub enum BiometryType {
/// No biometry hardware is available, or it is not enrolled with the operating system.
None = 0,
/// Fingerprint authentication (Apple Touch ID or Android fingerprint).
TouchID = 1,
/// Face authentication (Apple Face ID or Android face authentication).
FaceID = 2,
}
/// The result of [`Biometric::status`](crate::Biometric::status), describing whether biometric
/// authentication can currently be used.
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Status {
/// Whether the device can currently authenticate using biometrics.
pub is_available: bool,
/// The kind of biometry hardware detected on the device, even when [`Self::is_available`] is `false`.
pub biometry_type: BiometryType,
/// A human-readable reason why biometric authentication is unavailable. Only set when
/// [`Self::is_available`] is `false`.
pub error: Option<String>,
/// A platform-specific error code describing why biometric authentication is unavailable.
/// Only set when [`Self::is_available`] is `false`.
pub error_code: Option<String>,
}