pub trait LocalAuthGate: Send + Sync {
// Required method
fn authenticate(&self, view: GatedView) -> Result<(), LocalAuthError>;
}Expand description
The per-platform local-authentication seam, implemented by native code (Swift/Kotlin) behind the
capsule_core_ffi namespace’s LocalAuthGate foreign-trait mirror; a plain Rust trait here.
Rust calls into it to perform the fresh-auth challenge; core never sees the biometric or the
credential.
The biometric → credential fallback is entirely the implementation’s concern: an adapter
tries the enrolled biometric first (Face ID / Touch ID / BiometricPrompt) and falls back to the
device or account credential, surfacing only the outcome through this trait. Core treats any
Ok as a successful fresh auth regardless of which method produced it.
Required Methods§
Sourcefn authenticate(&self, view: GatedView) -> Result<(), LocalAuthError>
fn authenticate(&self, view: GatedView) -> Result<(), LocalAuthError>
Perform a fresh local-authentication challenge for view. Returns Ok on success (by
any enrolled method), or a LocalAuthError on denial, cancellation, or unavailability.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".