pub enum StructRole2 {
Show 41 variants
Document,
DocumentFragment,
Part,
Sect,
Div,
Aside,
NonStruct,
P,
Heading(NonZeroU16),
StructuredHeading,
Title,
FENote,
Sub,
Lbl,
Span,
Em,
Strong,
Link,
Annot,
Form,
Ruby,
RB,
RT,
RP,
Warichu,
WT,
WP,
L,
LI,
LBody,
Table,
TR,
TH,
TD,
THead,
TBody,
TFoot,
Caption,
Figure,
Formula,
Artifact,
}Expand description
PDF 2.0 roles the structure element fulfills in the document.
These are the predefined standard roles in PDF 2.0, matching the
https://www.iso.org/pdf2/ssn namespace. The writer may write their own
types and then provide a mapping using Namespace::role_map_ns. PDF 2.0+.
Variants§
Document
The whole document.
DocumentFragment
An incomplete fragment of another document.
Part
A part of a document that may contain multiple articles or sections.
Sect
Section of a larger document.
Div
Generic subdivision.
Aside
Content distinct from other content within the parent, such as callouts, sidebars, commentary, or background information.
NonStruct
Element only present for grouping purposes that shall not be exported.
P
A paragraph
Heading(NonZeroU16)
Heading with a specific level.
StructuredHeading
Strongly structured heading.
Title
A title of a document.
FENote
A foot- or endnote.
Sub
A subdivision within a block level element.
Lbl
Label for a list item.
Span
A generic inline element.
Em
An emphasized inline element.
Strong
An inline element with heightened (strong) importance.
Link
A link.
Annot
An association between an annotation and the content it belongs to.
Form
Form widget.
Ruby
Ruby annotation for CJK text.
RB
Base text of a Ruby annotation.
RT
Annotation text of a Ruby annotation.
RP
Punctuation in a Ruby annotation.
Warichu
Warichu annotation for CJK text.
WT
Text of a Warichu annotation.
WP
Punctuation of a Warichu annotation.
L
A list.
LI
A list item.
LBody
Description of the list item.
Table
A table.
TR
A table row.
TH
A table header cell.
TD
A table data cell.
THead
A table header row group.
TBody
A table data row group.
TFoot
A table footer row group.
Caption
An image or figure caption.
Figure
Item of graphical content.
Formula
Mathematical formula.
Artifact
An artifact not part of the logical content of the document.
Implementations§
Source§impl StructRole2
impl StructRole2
Sourcepub fn to_name(self, buf: &mut [u8; 6]) -> Name<'_>
pub fn to_name(self, buf: &mut [u8; 6]) -> Name<'_>
Convert the role into its Name serialization.
The buf parameter is a mutable buffer of 6 bytes that will be used to
store the name in the event that the role is a heading with a level.
Sourcepub fn compatibility_1_7(self, opts: RoleMapOpts) -> StructRole2Compat
pub fn compatibility_1_7(self, opts: RoleMapOpts) -> StructRole2Compat
How the type should be represented in PDF 1.7.
The opts parameter allows to control how certain roles are represented
in PDF 1.7. You can also use its default constructor.
Sourcepub fn role_type(self) -> StructRoleType2
pub fn role_type(self) -> StructRoleType2
Return the type of the structure element.
Trait Implementations§
Source§impl Clone for StructRole2
impl Clone for StructRole2
Source§fn clone(&self) -> StructRole2
fn clone(&self) -> StructRole2
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more