pub struct ElementIndex { /* private fields */ }Expand description
Index from local_name_hash → list of node references.
Used by the navigator to quickly locate elements by name without a
full document scan. Because different QNames may share the same
local_name_hash, callers must perform a secondary equality check
against the full QNameAtom.
Implementations§
Source§impl ElementIndex
impl ElementIndex
Sourcepub fn add(&mut self, local_name_hash: u32, node_ref: u32)
pub fn add(&mut self, local_name_hash: u32, node_ref: u32)
Records node_ref under the given local_name_hash.
Sourcepub fn find(&self, local_name_hash: u32) -> &[u32]
pub fn find(&self, local_name_hash: u32) -> &[u32]
Returns all node refs that share local_name_hash, or an empty slice.
Trait Implementations§
Source§impl Debug for ElementIndex
impl Debug for ElementIndex
Source§impl Default for ElementIndex
impl Default for ElementIndex
Source§fn default() -> ElementIndex
fn default() -> ElementIndex
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ElementIndex
impl RefUnwindSafe for ElementIndex
impl Send for ElementIndex
impl Sync for ElementIndex
impl Unpin for ElementIndex
impl UnsafeUnpin for ElementIndex
impl UnwindSafe for ElementIndex
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