pub struct StructuredRegion {
pub kind: RegionRole,
pub text: String,
pub bbox: Rect,
pub spans: Vec<TextSpan>,
pub column_index: Option<usize>,
pub section_id: Option<usize>,
}Expand description
A contiguous run of same-role spans, optionally tagged with a column index.
Fields§
§kind: RegionRoleThe semantic role of this region.
text: StringThe region’s text (spans joined with single spaces / newlines).
bbox: RectUnion bounding box of the region’s spans.
spans: Vec<TextSpan>The underlying spans that make up this region.
column_index: Option<usize>Column index for multi-column bodies: Some(0) = leftmost column,
Some(1) = next column, … None for full-width content, headings,
or chrome.
section_id: Option<usize>Logical section index from the nearest Sect/Art/Part structure
ancestor (ISO 32000-1:2008 §14.8.4.2) — the spec-authoritative,
page-independent grouping, so a chapter that continues across pages
keeps one section_id (§5/§6). None for untagged PDFs or content
outside any section.
Trait Implementations§
Source§impl Clone for StructuredRegion
impl Clone for StructuredRegion
Source§impl Debug for StructuredRegion
impl Debug for StructuredRegion
Auto Trait Implementations§
impl Freeze for StructuredRegion
impl RefUnwindSafe for StructuredRegion
impl Send for StructuredRegion
impl Sync for StructuredRegion
impl Unpin for StructuredRegion
impl UnsafeUnpin for StructuredRegion
impl UnwindSafe for StructuredRegion
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