pub struct TextLayerTally { /* private fields */ }Expand description
text_layer_is_vestigial’s counts, accumulated a page at a time so a
streaming caller need not keep the pages around to decide.
Implementations§
Source§impl TextLayerTally
impl TextLayerTally
pub fn add(&mut self, page: &PdfPage)
Sourcepub fn is_vestigial(&self) -> bool
pub fn is_vestigial(&self) -> bool
The verdict over the pages added so far.
Sourcepub fn proves_text(&self, total_pages: usize) -> bool
pub fn proves_text(&self, total_pages: usize) -> bool
Whether the pages added so far already rule vestigial out for a
document of total_pages, whatever the remaining pages hold — both
counts only grow, so a caller may stop parsing pages it does not need.
Trait Implementations§
Source§impl Clone for TextLayerTally
impl Clone for TextLayerTally
impl Copy for TextLayerTally
Source§impl Debug for TextLayerTally
impl Debug for TextLayerTally
Auto Trait Implementations§
impl Freeze for TextLayerTally
impl RefUnwindSafe for TextLayerTally
impl Send for TextLayerTally
impl Sync for TextLayerTally
impl Unpin for TextLayerTally
impl UnsafeUnpin for TextLayerTally
impl UnwindSafe for TextLayerTally
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().