pub struct ExtractSession {Show 15 fields
pub file_name: String,
pub config: ProcessingConfig,
pub author: Option<String>,
pub title: Option<String>,
pub creation_date: Option<String>,
pub modification_date: Option<String>,
pub producer: Option<String>,
pub creator: Option<String>,
pub number_of_pages: u32,
pub page_contents: Vec<Vec<ContentElement>>,
pub page_info_list: Vec<PageInfo>,
pub mcid_map: McidMap,
pub bookmarks: Vec<Bookmark>,
pub candidates: Vec<RasterCandidate>,
pub ocr_words: HashMap<u32, Vec<OcrWord>>,
}Expand description
Intermediate state between extract (plan) and assemble (finish).
Fields§
§file_name: StringDisplay / document name.
config: ProcessingConfigProcessing config snapshot.
Author metadata.
title: Option<String>Title metadata.
creation_date: Option<String>Creation date metadata.
modification_date: Option<String>Modification date metadata.
producer: Option<String>Producer metadata.
creator: Option<String>Creator metadata.
number_of_pages: u32Page count.
page_contents: Vec<Vec<ContentElement>>Per-page content elements (tables not yet recovered from OCR candidates).
page_info_list: Vec<PageInfo>Page geometry.
mcid_map: McidMapTagged PDF MCID map.
bookmarks: Vec<Bookmark>Bookmarks for heading refine.
candidates: Vec<RasterCandidate>OCR candidates (image feature).
ocr_words: HashMap<u32, Vec<OcrWord>>OCR words provided by the host, keyed by candidate id.
Implementations§
Source§impl ExtractSession
impl ExtractSession
Sourcepub fn provide_ocr(&mut self, id: u32, words: Vec<OcrWord>)
pub fn provide_ocr(&mut self, id: u32, words: Vec<OcrWord>)
Store host OCR words for a candidate (two-phase finish path).
Sourcepub fn candidate_metas(&self) -> Vec<RasterCandidateMeta>
pub fn candidate_metas(&self) -> Vec<RasterCandidateMeta>
Candidate metadata list (no pixels).
Sourcepub fn candidate_gray(&self, id: u32) -> Option<&[u8]>
pub fn candidate_gray(&self, id: u32) -> Option<&[u8]>
Gray pixels for a candidate id.
Auto Trait Implementations§
impl Freeze for ExtractSession
impl RefUnwindSafe for ExtractSession
impl Send for ExtractSession
impl Sync for ExtractSession
impl Unpin for ExtractSession
impl UnsafeUnpin for ExtractSession
impl UnwindSafe for ExtractSession
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more