pub struct StructTreeRoot {
pub root_elements: Vec<StructElem>,
pub parent_tree: Option<ParentTree>,
pub role_map: HashMap<String, String>,
}Expand description
The root of a PDF structure tree (StructTreeRoot dictionary).
This is the entry point for accessing a document’s logical structure. According to PDF spec Section 14.7.2, the StructTreeRoot contains:
/Type- Must be/StructTreeRoot/K- The immediate child or children of the structure tree root/ParentTree- Maps marked content to structure elements/RoleMap- Maps non-standard structure types to standard ones
Fields§
§root_elements: Vec<StructElem>Root structure element(s)
parent_tree: Option<ParentTree>Parent tree mapping MCIDs to structure elements (optional)
role_map: HashMap<String, String>Role map for custom structure types (optional)
Implementations§
Source§impl StructTreeRoot
impl StructTreeRoot
Sourcepub fn add_root_element(&mut self, elem: StructElem)
pub fn add_root_element(&mut self, elem: StructElem)
Add a root element to the structure tree
Trait Implementations§
Source§impl Clone for StructTreeRoot
impl Clone for StructTreeRoot
Source§impl Debug for StructTreeRoot
impl Debug for StructTreeRoot
Auto Trait Implementations§
impl Freeze for StructTreeRoot
impl RefUnwindSafe for StructTreeRoot
impl Send for StructTreeRoot
impl Sync for StructTreeRoot
impl Unpin for StructTreeRoot
impl UnsafeUnpin for StructTreeRoot
impl UnwindSafe for StructTreeRoot
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