pub struct StructuralIndex { /* private fields */ }Expand description
Result of structural indexing: a sequence of BlockBitmaps covering
the entire input.
Implementations§
Source§impl StructuralIndex
impl StructuralIndex
Sourcepub fn iter_delimiters(&self) -> DelimiterIter<'_> ⓘ
pub fn iter_delimiters(&self) -> DelimiterIter<'_> ⓘ
Iterate over all structural delimiter positions in input order.
Sourcepub fn estimated_token_count(&self) -> usize
pub fn estimated_token_count(&self) -> usize
Estimated number of tokens — used for Vec pre-allocation.
Heuristic: roughly one token per pair of </> delimiters,
plus text segments between them.
Sourcepub fn block_count(&self) -> usize
pub fn block_count(&self) -> usize
Number of 64-byte blocks.
Sourcepub fn block(&self, index: usize) -> &BlockBitmaps
pub fn block(&self, index: usize) -> &BlockBitmaps
Access the bitmaps for a specific block.
Auto Trait Implementations§
impl Freeze for StructuralIndex
impl RefUnwindSafe for StructuralIndex
impl Send for StructuralIndex
impl Sync for StructuralIndex
impl Unpin for StructuralIndex
impl UnsafeUnpin for StructuralIndex
impl UnwindSafe for StructuralIndex
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