pub enum ScanStrategy {
EarlyExit,
Full,
Sample(u32),
Pages(Vec<u32>),
}Expand description
Strategy for which pages to scan during detection
Variants§
EarlyExit
Scan all pages, stop on first non-text page (current default). Best for pipelines that route TextBased PDFs to fast extraction.
Full
Scan all pages, no early exit. Best when you need accurate Mixed vs Scanned classification.
Sample(u32)
Sample up to N evenly distributed pages (first, last, middle). Best for very large PDFs where speed matters more than precision.
Pages(Vec<u32>)
Only scan these specific 1-indexed page numbers. Best when the caller knows which pages to check.
Trait Implementations§
Source§impl Clone for ScanStrategy
impl Clone for ScanStrategy
Auto Trait Implementations§
impl Freeze for ScanStrategy
impl RefUnwindSafe for ScanStrategy
impl Send for ScanStrategy
impl Sync for ScanStrategy
impl Unpin for ScanStrategy
impl UnsafeUnpin for ScanStrategy
impl UnwindSafe for ScanStrategy
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> 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