pub struct PdfGrepBuilder { /* private fields */ }Expand description
Builder for PdfGrep (FR-039). All methods are independent and
order-agnostic; password(...) appends to the retry list and is the only
repeatable setter.
Implementations§
Source§impl PdfGrepBuilder
impl PdfGrepBuilder
Sourcepub fn pattern(self, p: impl Into<String>) -> Self
pub fn pattern(self, p: impl Into<String>) -> Self
Required pattern (PCRE or fixed string per fixed_strings/perl_regexp).
Sourcepub fn fixed_strings(self, on: bool) -> Self
pub fn fixed_strings(self, on: bool) -> Self
-F/--fixed-strings — escape metacharacters in pattern.
Sourcepub fn perl_regexp(self, on: bool) -> Self
pub fn perl_regexp(self, on: bool) -> Self
-P/--perl-regexp — use fancy-regex engine instead of regex.
Sourcepub fn case_insensitive(self, on: bool) -> Self
pub fn case_insensitive(self, on: bool) -> Self
-i/--ignore-case.
Sourcepub fn invert_match(self, on: bool) -> Self
pub fn invert_match(self, on: bool) -> Self
-v/--invert-match.
Sourcepub fn only_matching(self, on: bool) -> Self
pub fn only_matching(self, on: bool) -> Self
-o/--only-matching — Match.text is the matched span only.
Sourcepub fn page_range(self, range: Option<(u32, u32)>) -> Self
pub fn page_range(self, range: Option<(u32, u32)>) -> Self
--page-range N-M (1-indexed inclusive).
Sourcepub fn password(self, pwd: impl Into<String>) -> Self
pub fn password(self, pwd: impl Into<String>) -> Self
--password PWD — repeatable; each call APPENDS to the retry list
(FR-025, FR-039 + Clarifications Q4).
Sourcepub fn build(self) -> Result<PdfGrep, PdfGrepError>
pub fn build(self) -> Result<PdfGrep, PdfGrepError>
Trait Implementations§
Source§impl Clone for PdfGrepBuilder
impl Clone for PdfGrepBuilder
Source§fn clone(&self) -> PdfGrepBuilder
fn clone(&self) -> PdfGrepBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PdfGrepBuilder
impl Debug for PdfGrepBuilder
Source§impl Default for PdfGrepBuilder
impl Default for PdfGrepBuilder
Source§fn default() -> PdfGrepBuilder
fn default() -> PdfGrepBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PdfGrepBuilder
impl RefUnwindSafe for PdfGrepBuilder
impl Send for PdfGrepBuilder
impl Sync for PdfGrepBuilder
impl Unpin for PdfGrepBuilder
impl UnsafeUnpin for PdfGrepBuilder
impl UnwindSafe for PdfGrepBuilder
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