pub struct EntityScanner<'a> { /* private fields */ }Expand description
Fast entity scanner - scans file without full parsing O(n) performance for finding entities by type Uses memchr for SIMD-accelerated byte searching
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 for the next entity Returns (entity_id, type_name, line_start, line_end)
Sourcepub fn find_by_type(&mut self, target_type: &str) -> Vec<(u32, usize, usize)>
pub fn find_by_type(&mut self, target_type: &str) -> Vec<(u32, usize, usize)>
Find all entities of a specific type
Sourcepub fn count_by_type(&mut self) -> FxHashMap<String, usize>
pub fn count_by_type(&mut self) -> FxHashMap<String, usize>
Count entities by type
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> 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