libfprint-rs 0.3.1

Rust library for accesing fingerprint devices.
Documentation
use crate::print::FpPrint;

use super::{FpDevice, UserData};

impl<F, T> UserData<F, T>
where
    F: Fn(&FpDevice, i32, Option<FpPrint>, Option<glib::Error>, &Option<T>),
{
    pub(crate) fn callback_enroll(
        &self,
        device: &FpDevice,
        enroll_stage: i32,
        print: Option<FpPrint>,
        error: Option<glib::Error>,
    ) {
        (self.function)(device, enroll_stage, print, error, &self.data);
    }
}

impl<F, T> UserData<F, T>
where
    F: Fn(&FpDevice, Option<FpPrint>, FpPrint, Option<glib::Error>, &Option<T>),
{
    pub(crate) fn callback_match(
        &self,
        device: &FpDevice,
        match_print: Option<FpPrint>,
        print: FpPrint,
        error: Option<glib::Error>,
    ) {
        (self.function)(device, match_print, print, error, &self.data);
    }
}