pub struct ParseConfigBuilder { /* private fields */ }Expand description
Fluent builder equivalent to TS new LiteParse(partial).
Implementations§
Source§impl ParseConfigBuilder
impl ParseConfigBuilder
pub fn ocr_enabled(self, on: bool) -> Self
pub fn ocr_server_url(self, url: impl Into<String>) -> Self
pub fn dpi(self, dpi: u32) -> Self
pub fn output_format(self, fmt: OutputFormat) -> Self
pub fn max_pages(self, max: u32) -> Self
pub fn target_pages(self, spec: impl Into<String>) -> Self
pub fn num_workers(self, n: usize) -> Self
pub fn password(self, pw: impl Into<String>) -> Self
pub fn precise_bounding_box(self, on: bool) -> Self
Sourcepub fn timeout_secs(self, secs: u64) -> Self
pub fn timeout_secs(self, secs: u64) -> Self
Fail parse() if wall-clock work exceeds this many seconds.
Sourcepub fn max_input_bytes(self, bytes: u64) -> Self
pub fn max_input_bytes(self, bytes: u64) -> Self
Reject ParseInput::Bytes payloads larger than this many bytes.
pub fn config(self) -> ParseConfig
pub fn build(self) -> SpdfParser
Trait Implementations§
Source§impl Debug for ParseConfigBuilder
impl Debug for ParseConfigBuilder
Source§impl Default for ParseConfigBuilder
impl Default for ParseConfigBuilder
Source§fn default() -> ParseConfigBuilder
fn default() -> ParseConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ParseConfigBuilder
impl RefUnwindSafe for ParseConfigBuilder
impl Send for ParseConfigBuilder
impl Sync for ParseConfigBuilder
impl Unpin for ParseConfigBuilder
impl UnsafeUnpin for ParseConfigBuilder
impl UnwindSafe for ParseConfigBuilder
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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