pub struct EntityScanner<'a> { /* private fields */ }Expand description
Fast entity scanner for IFC files
Uses memchr for SIMD-accelerated scanning to quickly find entity boundaries without full parsing.
Implementations§
Source§impl<'a> EntityScanner<'a>
impl<'a> EntityScanner<'a>
Sourcepub fn next_entity(&mut self) -> Option<(u32, &'a str, usize, usize)>
pub fn next_entity(&mut self) -> Option<(u32, &'a str, usize, usize)>
Scan to find the next entity
Returns (id, type_name, start_byte, end_byte)
Sourcepub fn build_index(content: &'a str) -> FxHashMap<u32, (usize, usize)>
pub fn build_index(content: &'a str) -> FxHashMap<u32, (usize, usize)>
Build an index of all entities (ID -> byte offsets)
Sourcepub fn find_by_type(
content: &'a str,
target_type: &str,
) -> Vec<(u32, usize, usize)>
pub fn find_by_type( content: &'a str, target_type: &str, ) -> Vec<(u32, usize, usize)>
Find all entities of a specific type
Sourcepub fn entity_count(content: &'a str) -> usize
pub fn entity_count(content: &'a str) -> usize
Get total entity count
Auto Trait Implementations§
impl<'a> Freeze for EntityScanner<'a>
impl<'a> RefUnwindSafe for EntityScanner<'a>
impl<'a> Send for EntityScanner<'a>
impl<'a> Sync for EntityScanner<'a>
impl<'a> Unpin for EntityScanner<'a>
impl<'a> UnsafeUnpin for EntityScanner<'a>
impl<'a> UnwindSafe for EntityScanner<'a>
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