pub struct ParseConfig {Show 16 fields
pub ocr_language: Language,
pub ocr_enabled: bool,
pub ocr_server_url: Option<String>,
pub tessdata_path: Option<String>,
pub num_workers: usize,
pub max_pages: u32,
pub target_pages: Option<String>,
pub dpi: u32,
pub output_format: OutputFormat,
pub precise_bounding_box: bool,
pub preserve_very_small_text: bool,
pub preserve_layout_alignment_across_pages: bool,
pub password: Option<String>,
pub timeout_secs: Option<u64>,
pub max_input_bytes: Option<u64>,
pub debug: Option<DebugConfig>,
}Expand description
Full parser configuration. Defaults are identical to
DEFAULT_CONFIG in [liteparse/src/core/config.ts].
Fields§
§ocr_language: Language§ocr_enabled: bool§ocr_server_url: Option<String>§tessdata_path: Option<String>§num_workers: usize§max_pages: u32§target_pages: Option<String>§dpi: u32§output_format: OutputFormat§precise_bounding_box: bool§preserve_very_small_text: bool§preserve_layout_alignment_across_pages: bool§password: Option<String>§timeout_secs: Option<u64>Fail parse() with [SpdfError::InvalidInput] once wall-clock
work exceeds this many seconds. None = no deadline. Intended
as a defensive guard against pathological adversarial PDFs;
legitimate documents should never hit this.
max_input_bytes: Option<u64>Hard cap on the size of an input blob accepted by parse. None
= no cap. Paths are not checked; only ParseInput::Bytes.
debug: Option<DebugConfig>Trait Implementations§
Source§impl Clone for ParseConfig
impl Clone for ParseConfig
Source§fn clone(&self) -> ParseConfig
fn clone(&self) -> ParseConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 ParseConfig
impl Debug for ParseConfig
Source§impl Default for ParseConfig
impl Default for ParseConfig
Source§impl<'de> Deserialize<'de> for ParseConfig
impl<'de> Deserialize<'de> for ParseConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ParseConfig
impl RefUnwindSafe for ParseConfig
impl Send for ParseConfig
impl Sync for ParseConfig
impl Unpin for ParseConfig
impl UnsafeUnpin for ParseConfig
impl UnwindSafe for ParseConfig
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