1use std::{fmt::Debug, time::Duration};
2
3use serde::{Deserialize, Serialize};
4
5pub mod solution;
6pub mod types;
7pub use captcha_oxide_macros::captcha;
8
9pub trait Captcha: Serialize + Send + Sync + Debug {
10 type Solution: for<'de> Deserialize<'de> + Debug + Send + Sync + PartialEq + Eq;
11 type Builder: Default;
12
13 fn get_timeout(&self) -> Duration;
14
15 #[must_use]
16 fn builder() -> Self::Builder {
17 Self::Builder::default()
18 }
19}
20
21#[derive(Serialize, PartialEq, Eq, Debug)]
22pub struct Empty;