pub struct StructureElement {
pub page: u32,
pub mcid: i64,
pub role: String,
}Expand description
One structure-tree element reference from a tagged PDF, resolved to a page and Marked Content ID.
Join (page, mcid) against TextItem::page / TextItem::mcid from
extract_text_with_positions to attach semantic roles (heading levels,
paragraphs, table cells, …) to extracted text.
Fields§
§page: u321-indexed page number (matches TextItem::page).
mcid: i64Marked Content ID from the page’s content stream (matches
TextItem::mcid).
role: StringStandard structure type name (“H1”..“H6”, “P”, “Table”, “TD”, …).
Custom tags are resolved through the document’s /RoleMap; tags
with no standard mapping are returned verbatim.
Trait Implementations§
Source§impl Clone for StructureElement
impl Clone for StructureElement
Auto Trait Implementations§
impl Freeze for StructureElement
impl RefUnwindSafe for StructureElement
impl Send for StructureElement
impl Sync for StructureElement
impl Unpin for StructureElement
impl UnsafeUnpin for StructureElement
impl UnwindSafe for StructureElement
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