pub struct PdfOptions {
pub layout_mode: LayoutMode,
pub max_pages: Option<usize>,
}Expand description
PDF 解析选项:后端(页数截断)与插件(版式模式)共享同一份配置。
Fields§
§layout_mode: LayoutMode版式模式,默认 Auto
max_pages: Option<usize>只解析前 N 页(对齐 Python max_pages);超出时结果标 truncated
Implementations§
Source§impl PdfOptions
impl PdfOptions
Sourcepub fn with_layout_mode(self, mode: LayoutMode) -> Self
pub fn with_layout_mode(self, mode: LayoutMode) -> Self
设置版式模式(链式)。
Sourcepub fn with_max_pages(self, pages: usize) -> Self
pub fn with_max_pages(self, pages: usize) -> Self
设置页数上限(链式)。
Trait Implementations§
Source§impl Clone for PdfOptions
impl Clone for PdfOptions
Source§impl Debug for PdfOptions
impl Debug for PdfOptions
Auto Trait Implementations§
impl Freeze for PdfOptions
impl RefUnwindSafe for PdfOptions
impl Send for PdfOptions
impl Sync for PdfOptions
impl Unpin for PdfOptions
impl UnsafeUnpin for PdfOptions
impl UnwindSafe for PdfOptions
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