pub struct TextSearch;Expand description
Search for text across a PDF document.
Implementations§
Source§impl TextSearch
impl TextSearch
Sourcepub fn search(
doc: &mut PdfDoc,
pattern: &str,
options: &SearchOptions,
) -> Result<Vec<SearchResult>>
pub fn search( doc: &mut PdfDoc, pattern: &str, options: &SearchOptions, ) -> Result<Vec<SearchResult>>
Search for a pattern in a document.
Returns all matches across the specified page range.
Sourcepub fn contains(doc: &mut PdfDoc, pattern: &str) -> Result<bool>
pub fn contains(doc: &mut PdfDoc, pattern: &str) -> Result<bool>
Quick check: does the pattern appear anywhere in the document?
Sourcepub fn count(doc: &mut PdfDoc, pattern: &str) -> Result<usize>
pub fn count(doc: &mut PdfDoc, pattern: &str) -> Result<usize>
Count total occurrences of pattern across all pages.
Sourcepub fn search_regex(
doc: &mut PdfDoc,
pattern: &str,
options: &SearchOptions,
) -> Result<Vec<SearchResult>>
pub fn search_regex( doc: &mut PdfDoc, pattern: &str, options: &SearchOptions, ) -> Result<Vec<SearchResult>>
Search with regex pattern.
Auto Trait Implementations§
impl Freeze for TextSearch
impl RefUnwindSafe for TextSearch
impl Send for TextSearch
impl Sync for TextSearch
impl Unpin for TextSearch
impl UnsafeUnpin for TextSearch
impl UnwindSafe for TextSearch
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