#[non_exhaustive]pub struct Print {
pub template: Template,
pub finger: Option<Finger>,
pub username: Option<String>,
pub description: Option<String>,
pub driver: Option<DriverId>,
pub device_id: Option<DeviceId>,
pub device_stored: bool,
pub enroll_date: Option<EnrollDate>,
}Expand description
A fingerprint print: biometric Template plus the metadata libfprint serializes
alongside it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.template: TemplateThe biometric payload. Template::Undefined until an enrollment fills it in.
finger: Option<Finger>Which finger this is, when known.
username: Option<String>Owning user, as fprintd stores it under /var/lib/fprint/<user>/.
description: Option<String>Free-form label libfprint carries alongside the template.
driver: Option<DriverId>Driver id this template is bound to (templates are device/driver-specific).
device_id: Option<DeviceId>The specific reader this template came from, when the driver binds that tightly.
device_stored: boolTrue when the real template lives on the sensor and this Print is only a handle
(fpi_print_set_device_stored). Always true for MOC prints.
enroll_date: Option<EnrollDate>When the print was enrolled, when the backend records it.
Implementations§
Source§impl Print
impl Print
Sourcepub fn new_for_enroll(finger: Finger) -> Print
pub fn new_for_enroll(finger: Finger) -> Print
A blank print to hand to crate::Device::enroll, tagged with the target finger.
Sourcepub fn builder() -> PrintBuilder
pub fn builder() -> PrintBuilder
A PrintBuilder with every field unset, the canonical way to construct a Print.
Sourcepub fn is_compatible_with_driver(&self, driver: &DriverId) -> bool
pub fn is_compatible_with_driver(&self, driver: &DriverId) -> bool
Whether this print’s template is compatible with a device advertising driver.
Corresponds to libfprint’s fp_print_compatible, which additionally checks
device_id for some drivers; those transport-specific rules are left to the backend.