pub struct Parser { /* private fields */ }Expand description
M0 PDF parser.
Implementations§
Source§impl Parser
impl Parser
Sourcepub fn new(limits: ResourceLimits) -> Self
pub fn new(limits: ResourceLimits) -> Self
Creates a parser with the supplied resource limits.
Sourcepub fn with_decoder_registry(
limits: ResourceLimits,
decoder_registry: DecoderRegistry,
) -> Self
pub fn with_decoder_registry( limits: ResourceLimits, decoder_registry: DecoderRegistry, ) -> Self
Creates a parser with explicit resource limits and stream decoders.
Sourcepub fn parse<R: PdfSource>(&self, source: R) -> Result<ParsedDocument>
pub fn parse<R: PdfSource>(&self, source: R) -> Result<ParsedDocument>
Parses a seekable PDF source into a tolerant document model.
§Errors
Returns crate::PdfvError when input cannot be read, exceeds a resource
limit, or is too malformed for M0 recovery.
Sourcepub fn parse_with_options<R: PdfSource>(
&self,
source: R,
options: ParseOptions<'_>,
) -> Result<ParsedDocument>
pub fn parse_with_options<R: PdfSource>( &self, source: R, options: ParseOptions<'_>, ) -> Result<ParsedDocument>
Parses a seekable PDF source with optional password state.
§Errors
Returns crate::PdfvError when input cannot be read, exceeds a resource
limit, or is too malformed for recovery.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Parser
impl !RefUnwindSafe for Parser
impl Send for Parser
impl Sync for Parser
impl Unpin for Parser
impl UnsafeUnpin for Parser
impl !UnwindSafe for Parser
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