1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Hcaptcha Trait
use crate::{HcaptchaError, HcaptchaResponse};
// use async_trait::async_trait;
use std::{future::Future, pin::Pin};

/// Hcaptcha trait
pub trait Hcaptcha {
    /// valid response function
    fn valid_response(
        &self,
        secret: &str,
        uri: Option<String>,
    ) -> Pin<Box<dyn Future<Output = Result<HcaptchaResponse, HcaptchaError>> + Send>>;
}