pub struct ScreenshotIngester { /* private fields */ }Expand description
Screenshot ingester backed by an OCR backend implementation.
Implementations§
Source§impl ScreenshotIngester
impl ScreenshotIngester
Sourcepub fn new(backend: Arc<dyn OcrBackend>) -> Self
pub fn new(backend: Arc<dyn OcrBackend>) -> Self
Create a new screenshot ingester with default config.
Sourcepub fn with_config(
backend: Arc<dyn OcrBackend>,
config: ScreenshotIngesterConfig,
) -> Self
pub fn with_config( backend: Arc<dyn OcrBackend>, config: ScreenshotIngesterConfig, ) -> Self
Create a screenshot ingester with custom config.
Sourcepub fn with_tesseract() -> Self
pub fn with_tesseract() -> Self
Create a screenshot 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 screenshot ingester backed by Tesseract with custom OCR config.
Sourcepub fn with_tesseract_and_config(
ocr_config: TesseractOcrConfig,
config: ScreenshotIngesterConfig,
) -> Self
pub fn with_tesseract_and_config( ocr_config: TesseractOcrConfig, config: ScreenshotIngesterConfig, ) -> Self
Create a screenshot ingester with custom ingestion + Tesseract OCR configs.
Sourcepub fn with_apple_vision() -> Self
pub fn with_apple_vision() -> Self
Create a screenshot 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 screenshot ingester backed by Apple Vision with custom OCR config.
Sourcepub fn with_apple_vision_and_config(
ocr_config: AppleVisionOcrConfig,
config: ScreenshotIngesterConfig,
) -> Self
pub fn with_apple_vision_and_config( ocr_config: AppleVisionOcrConfig, config: ScreenshotIngesterConfig, ) -> Self
Create a screenshot ingester with custom ingestion + Apple Vision OCR configs.
Sourcepub async fn ingest_file(&self, path: &Path) -> Result<ScreenshotDocument>
pub async fn ingest_file(&self, path: &Path) -> Result<ScreenshotDocument>
Ingest a screenshot 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 screenshot and convert directly to a knowledge entry scaffold.
Trait Implementations§
Source§impl Clone for ScreenshotIngester
impl Clone for ScreenshotIngester
Source§fn clone(&self) -> ScreenshotIngester
fn clone(&self) -> ScreenshotIngester
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 ScreenshotIngester
impl !RefUnwindSafe for ScreenshotIngester
impl Send for ScreenshotIngester
impl Sync for ScreenshotIngester
impl Unpin for ScreenshotIngester
impl UnsafeUnpin for ScreenshotIngester
impl !UnwindSafe for ScreenshotIngester
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