pub enum PdfStructElementType {
Show 41 variants
Document,
Part,
Div,
Span,
P,
H,
H1,
H2,
H3,
H4,
H5,
H6,
Table,
TR,
TH,
TD,
THead,
TBody,
TFoot,
L,
LI,
Lbl,
LBody,
Figure,
Formula,
Form,
Code,
BlockQuote,
Caption,
Link,
Note,
TOC,
TOCI,
Sect,
Art,
Reference,
BibEntry,
Quote,
Index,
NonStruct,
Other(String),
}Expand description
The type of a PDF structure element, corresponding to the standard structure types defined in the PDF specification (ISO 32000).
Variants§
Document
Part
Div
Span
P
H
H1
H2
H3
H4
H5
H6
Table
TR
TH
TD
THead
TBody
TFoot
L
LI
Lbl
LBody
Figure
Formula
Form
Code
BlockQuote
Caption
Link
Note
TOC
TOCI
Sect
Art
Reference
BibEntry
Quote
Index
NonStruct
Other(String)
Implementations§
Source§impl PdfStructElementType
impl PdfStructElementType
Sourcepub fn from_pdf_type_string(s: &str) -> Self
pub fn from_pdf_type_string(s: &str) -> Self
Parses a PDF structure type string (the /S entry) into a PdfStructElementType.
Sourcepub fn is_heading(&self) -> bool
pub fn is_heading(&self) -> bool
Returns true if this element type is a heading (H, H1-H6).
Sourcepub fn heading_level(&self) -> Option<u8>
pub fn heading_level(&self) -> Option<u8>
Returns the heading level (1-6) for H1-H6 elements, or None for non-heading elements
and the generic H element.
Sourcepub fn is_table_element(&self) -> bool
pub fn is_table_element(&self) -> bool
Returns true if this element type is a table-related element
(Table, TR, TH, TD, THead, TBody, TFoot).
Sourcepub fn is_list_element(&self) -> bool
pub fn is_list_element(&self) -> bool
Returns true if this element type is a list-related element (L, LI, Lbl, LBody).
Sourcepub fn is_block_level(&self) -> bool
pub fn is_block_level(&self) -> bool
Returns true if this element type is a block-level element.
Trait Implementations§
Source§impl Clone for PdfStructElementType
impl Clone for PdfStructElementType
Source§fn clone(&self) -> PdfStructElementType
fn clone(&self) -> PdfStructElementType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PdfStructElementType
impl Debug for PdfStructElementType
impl Eq for PdfStructElementType
Source§impl Hash for PdfStructElementType
impl Hash for PdfStructElementType
Source§impl PartialEq for PdfStructElementType
impl PartialEq for PdfStructElementType
impl StructuralPartialEq for PdfStructElementType
Auto Trait Implementations§
impl Freeze for PdfStructElementType
impl RefUnwindSafe for PdfStructElementType
impl Send for PdfStructElementType
impl Sync for PdfStructElementType
impl Unpin for PdfStructElementType
impl UnsafeUnpin for PdfStructElementType
impl UnwindSafe for PdfStructElementType
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