pub struct StructuralIndexer { /* private fields */ }Expand description
SIMD-powered structural character indexer.
Scans input in 64-byte blocks, producing bitmasks for each delimiter
type. Quote-aware masking ensures delimiters inside "..." or '...'
are not flagged as structural.
§Example
use fhp_tokenizer::structural::StructuralIndexer;
let indexer = StructuralIndexer::new();
let index = indexer.index(b"<div class=\"foo\">bar</div>");
let delimiters: Vec<_> = index.iter_delimiters().collect();
assert!(delimiters.len() > 0);Implementations§
Source§impl StructuralIndexer
impl StructuralIndexer
Sourcepub fn index(&self, input: &[u8]) -> StructuralIndex
pub fn index(&self, input: &[u8]) -> StructuralIndex
Scan input and produce a StructuralIndex.
The input is processed in 64-byte blocks. For each block, a
BlockBitmaps is produced with bitmasks for every HTML delimiter.
Quote-aware masking is then applied to clear non-structural positions.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StructuralIndexer
impl RefUnwindSafe for StructuralIndexer
impl Send for StructuralIndexer
impl Sync for StructuralIndexer
impl Unpin for StructuralIndexer
impl UnsafeUnpin for StructuralIndexer
impl UnwindSafe for StructuralIndexer
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