pub struct PipelineState {
pub pages: Vec<PageContent>,
pub config: ProcessingConfig,
pub mcid_map: Option<McidMap>,
pub page_info: Vec<PageInfo>,
}Expand description
Pipeline state passed between stages.
Fields§
§pages: Vec<PageContent>Per-page content elements
config: ProcessingConfigProcessing configuration
mcid_map: Option<McidMap>MCID map from structure tree (tagged PDFs). Maps (page_number, mcid) → tag info for heading detection.
page_info: Vec<PageInfo>Per-page geometry (MediaBox, width, height). Index matches pages.
Implementations§
Source§impl PipelineState
impl PipelineState
Sourcepub fn new(pages: Vec<PageContent>, config: ProcessingConfig) -> Self
pub fn new(pages: Vec<PageContent>, config: ProcessingConfig) -> Self
Create a new pipeline state from raw page content.
Sourcepub fn with_mcid_map(
pages: Vec<PageContent>,
config: ProcessingConfig,
mcid_map: McidMap,
) -> Self
pub fn with_mcid_map( pages: Vec<PageContent>, config: ProcessingConfig, mcid_map: McidMap, ) -> Self
Create a new pipeline state with an MCID map from a tagged PDF.
Sourcepub fn with_page_info(self, page_info: Vec<PageInfo>) -> Self
pub fn with_page_info(self, page_info: Vec<PageInfo>) -> Self
Create a new pipeline state with page geometry.
Sourcepub fn total_elements(&self) -> usize
pub fn total_elements(&self) -> usize
Total number of content elements across all pages.
Auto Trait Implementations§
impl Freeze for PipelineState
impl RefUnwindSafe for PipelineState
impl Send for PipelineState
impl Sync for PipelineState
impl Unpin for PipelineState
impl UnsafeUnpin for PipelineState
impl UnwindSafe for PipelineState
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> 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