pub struct PhotoIngester { /* private fields */ }Expand description
Photo ingester backed by an OCR backend implementation.
Implementations§
Source§impl PhotoIngester
impl PhotoIngester
Sourcepub fn new(backend: Arc<dyn OcrBackend>) -> Self
pub fn new(backend: Arc<dyn OcrBackend>) -> Self
Create a new photo ingester with default config.
Sourcepub fn with_config(
backend: Arc<dyn OcrBackend>,
config: PhotoIngesterConfig,
) -> Self
pub fn with_config( backend: Arc<dyn OcrBackend>, config: PhotoIngesterConfig, ) -> Self
Create a photo ingester with custom config.
Sourcepub fn with_tesseract() -> Self
pub fn with_tesseract() -> Self
Create a photo ingester backed by the real Tesseract OCR backend.
Sourcepub fn with_tesseract_config(ocr_config: TesseractOcrConfig) -> Self
pub fn with_tesseract_config(ocr_config: TesseractOcrConfig) -> Self
Create a photo ingester backed by Tesseract with custom OCR config.
Sourcepub fn with_tesseract_and_config(
ocr_config: TesseractOcrConfig,
config: PhotoIngesterConfig,
) -> Self
pub fn with_tesseract_and_config( ocr_config: TesseractOcrConfig, config: PhotoIngesterConfig, ) -> Self
Create a photo ingester with custom ingestion + Tesseract OCR configs.
Sourcepub fn with_apple_vision() -> Self
pub fn with_apple_vision() -> Self
Create a photo ingester backed by Apple’s Vision OCR (macOS-only at runtime).
Sourcepub fn with_apple_vision_config(ocr_config: AppleVisionOcrConfig) -> Self
pub fn with_apple_vision_config(ocr_config: AppleVisionOcrConfig) -> Self
Create a photo ingester backed by Apple Vision with custom OCR config.
Sourcepub fn with_apple_vision_and_config(
ocr_config: AppleVisionOcrConfig,
config: PhotoIngesterConfig,
) -> Self
pub fn with_apple_vision_and_config( ocr_config: AppleVisionOcrConfig, config: PhotoIngesterConfig, ) -> Self
Create a photo ingester with custom ingestion + Apple Vision OCR configs.
Sourcepub async fn ingest_file(&self, path: &Path) -> Result<PhotoDocument>
pub async fn ingest_file(&self, path: &Path) -> Result<PhotoDocument>
Ingest a photo image file into structured OCR chunks.
Sourcepub async fn ingest_as_entry(&self, path: &Path) -> Result<KnowledgeEntry>
pub async fn ingest_as_entry(&self, path: &Path) -> Result<KnowledgeEntry>
Ingest a photo and convert directly to a knowledge entry scaffold.
Trait Implementations§
Source§impl Clone for PhotoIngester
impl Clone for PhotoIngester
Source§fn clone(&self) -> PhotoIngester
fn clone(&self) -> PhotoIngester
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PhotoIngester
impl !RefUnwindSafe for PhotoIngester
impl Send for PhotoIngester
impl Sync for PhotoIngester
impl Unpin for PhotoIngester
impl UnsafeUnpin for PhotoIngester
impl !UnwindSafe for PhotoIngester
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request