pub struct FragmentIndex { /* private fields */ }Expand description
The string-only registry of what spilled content still owes the rest of the conversion.
Implementations§
Source§impl FragmentIndex
impl FragmentIndex
Sourcepub fn record_id(&mut self, id: &str, segment: SegmentId)
pub fn record_id(&mut self, id: &str, segment: SegmentId)
A spilled node’s xml:id, and the segment now holding it.
Sourcepub fn record_label(&mut self, label: &str, id: &str)
pub fn record_label(&mut self, label: &str, id: &str)
A label → xml:id association from spilled content.
Sourcepub fn record_rdfa_prefix(&mut self, prefix: &str, uri: &str)
pub fn record_rdfa_prefix(&mut self, prefix: &str, uri: &str)
An RDFa prefix declaration (prefix → uri) seen in spilled content.
Sourcepub fn id_segment(&self, id: &str) -> Option<SegmentId>
pub fn id_segment(&self, id: &str) -> Option<SegmentId>
Which segment holds id, if it was spilled.
Sourcepub fn contains_id(&self, id: &str) -> bool
pub fn contains_id(&self, id: &str) -> bool
Is id claimed by any spilled fragment? (The global half of id-collision
dedup; the live spine’s half stays in Document::idstore.)
Sourcepub fn label_id(&self, label: &str) -> Option<&str>
pub fn label_id(&self, label: &str) -> Option<&str>
The xml:id a spilled label resolves to, if any.
Sourcepub fn labels(&self) -> impl Iterator<Item = (&str, &str)>
pub fn labels(&self) -> impl Iterator<Item = (&str, &str)>
All spilled label → id associations (merged into each fragment’s — and
the spine’s — rewrite_labels before rules run, so a label:-scoped
rule resolves no matter which fragment holds the label).
Sourcepub fn sizes(&self) -> (usize, usize, usize)
pub fn sizes(&self) -> (usize, usize, usize)
Registry sizes (ids, labels, rdfa) — pass-1 telemetry.
Sourcepub fn rdfa_prefixes(&self) -> impl Iterator<Item = (&str, &str)>
pub fn rdfa_prefixes(&self) -> impl Iterator<Item = (&str, &str)>
All RDFa prefix declarations contributed by spilled content.