captcha-engine 0.4.10

ONNX-based captcha recognition engine
Documentation
//! Error types for the captcha engine.

/// Result type alias for captcha engine operations.
pub type Result<T> = std::result::Result<T, Error>;

/// Errors that can occur during captcha processing.
#[derive(Debug, thiserror::Error)]
pub enum Error {
    /// I/O error (file operations).
    #[error(transparent)]
    Io(#[from] std::io::Error),

    /// Image processing error.
    #[error(transparent)]
    Image(#[from] image::ImageError),

    /// HTTP request error (only available with `download` feature).
    #[cfg(feature = "download")]
    #[error(transparent)]
    Request(#[from] reqwest::Error),

    /// Model download failed.
    #[error("Model download failed: {0}")]
    ModelDownload(String),

    /// Model loading failed.
    #[error("Model load failed: {0}")]
    ModelLoad(String),

    /// Inference failed.
    #[error("Inference failed: {0}")]
    Inference(String),
}