pub trait OcrBackend: Send + Sync {
// Required methods
fn recognize(
&self,
image_data: &[u8],
width: u32,
height: u32,
) -> Result<OcrResult, OcrError>;
fn name(&self) -> &str;
}Expand description
Pluggable OCR backend.
Implementations receive raw RGB pixel data and return recognized text.
Implementations must be Send + Sync so they can be held in a static
or shared across threads.