Expand description
OCR backend trait and implementations.
§OCR Backend Extension
The OcrBackend trait is public. Callers can implement their own backends
for specific use cases:
-
ocrs (this crate,
ocrfeature): pure-Rust Tesseract-style engine. WASM-compatible. Requires external model files (.rtenformat). -
Mistral OCR (
ocr-mistralfeature): blocking HTTP adapter to Mistral’s cloud OCR API. -
Google Vision (
ocr-googlefeature): blocking HTTP adapter to Google Cloud Vision’simages:annotateOCR endpoint. -
AWS Textract (
ocr-awsfeature): blocking HTTP adapter to Amazon Textract’sDetectDocumentTextendpoint. -
Azure Document Intelligence (
ocr-azurefeature): blocking HTTP adapter to theprebuilt-readmodel. -
Paddle ONNX (
ocr-onnxfeature): adapter aroundpdf-ocr’s PaddleOCR engine. -
Custom: implement
OcrBackenddirectly for proprietary or cloud-based OCR flows.
Structs§
Enums§
- OcrError
- Errors returned by an
OcrBackend.
Traits§
- OcrBackend
- Pluggable OCR backend.
Functions§
- best_
available_ backend - Return the first available OCR backend in priority order.