pub struct TabContent {
pub named_ranges: BTreeMap<String, NamedRanges>,
pub tab_id: Option<String>,
pub title: Option<String>,
pub nesting_level: i64,
pub elements: Vec<DocElement>,
pub headers: Vec<SegmentContent>,
pub footers: Vec<SegmentContent>,
pub footnotes: Vec<SegmentContent>,
}Expand description
One tab’s flattened content.
Fields§
§named_ranges: BTreeMap<String, NamedRanges>Named-range IDs and their full spans, sorted by name in JSON/YAML. JSONL continues to stream only structural elements.
tab_id: Option<String>The tab’s id, absent for a legacy single-body document.
title: Option<String>The tab’s title, likewise.
nesting_level: i64Depth in the tab tree.
elements: Vec<DocElement>The tab’s structural elements, in index order.
headers: Vec<SegmentContent>The tab’s page headers, when it has any, ordered by segment id.
The tab’s page footers, likewise.
footnotes: Vec<SegmentContent>The tab’s footnotes, likewise.
Implementations§
Source§impl TabContent
impl TabContent
Sourcepub fn segments_by_kind(&self) -> [(SegmentKind, &Vec<SegmentContent>); 3]
pub fn segments_by_kind(&self) -> [(SegmentKind, &Vec<SegmentContent>); 3]
Every segment kind’s content, in header/footer/footnote order.
The single source of truth both ReadOutcome::flat_elements
(-o jsonl) and the CLI’s -o table renderer walk, so a future
segment kind is added in one place rather than kept in sync by hand
across both.
Trait Implementations§
Source§impl Clone for TabContent
impl Clone for TabContent
Source§impl Debug for TabContent
impl Debug for TabContent
impl Eq for TabContent
Source§impl PartialEq for TabContent
impl PartialEq for TabContent
Source§impl Serialize for TabContent
impl Serialize for TabContent
impl StructuralPartialEq for TabContent
Auto Trait Implementations§
impl Freeze for TabContent
impl RefUnwindSafe for TabContent
impl Send for TabContent
impl Sync for TabContent
impl Unpin for TabContent
impl UnsafeUnpin for TabContent
impl UnwindSafe for TabContent
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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