pub struct DocumentParser;Expand description
Document parser
Implementations§
Source§impl DocumentParser
impl DocumentParser
Sourcepub fn parse(content: &str) -> DocumentStructure
pub fn parse(content: &str) -> DocumentStructure
Parse a document and extract its structure
Sourcepub fn parse_with_format(
content: &str,
format: DocumentFormat,
) -> DocumentStructure
pub fn parse_with_format( content: &str, format: DocumentFormat, ) -> DocumentStructure
Parse a document with explicit format
Sourcepub fn parse_pdf(data: &[u8]) -> Result<DocumentStructure, PdfParseError>
pub fn parse_pdf(data: &[u8]) -> Result<DocumentStructure, PdfParseError>
Parse binary PDF data and extract its structure
Sourcepub fn parse_pdf_file(path: &Path) -> Result<DocumentStructure, PdfParseError>
pub fn parse_pdf_file(path: &Path) -> Result<DocumentStructure, PdfParseError>
Parse binary PDF from a file path
Auto Trait Implementations§
impl Freeze for DocumentParser
impl RefUnwindSafe for DocumentParser
impl Send for DocumentParser
impl Sync for DocumentParser
impl Unpin for DocumentParser
impl UnwindSafe for DocumentParser
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