geronimo-captcha 1.0.0

Secure, AI-resistant, JavaScript-free CAPTCHA built in Rust. Confuses bots, but delights humans.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::registry::RegistryCheckResult;
use thiserror::Error;

pub type Result<T> = std::result::Result<T, CaptchaError>;

#[derive(Error, Debug)]
pub enum CaptchaError {
    #[error("invalid input: {0}")]
    InvalidInput(String),
    #[error("decode image")]
    Decode(#[source] image::ImageError),
    #[error("encode image")]
    Encode(#[source] image::ImageError),
    #[error("registry error: {0}")]
    Registry(RegistryCheckResult),
    #[error("internal error: {0}")]
    Internal(String),
}