pub struct NodeSetNamespaceMapper<'a> { /* private fields */ }Expand description
Utility handling namespaces when loading node sets.
Implementations§
Source§impl<'a> NodeSetNamespaceMapper<'a>
impl<'a> NodeSetNamespaceMapper<'a>
Sourcepub fn new(namespaces: &'a mut NamespaceMap) -> Self
pub fn new(namespaces: &'a mut NamespaceMap) -> Self
Create a new namespace mapper from the given namespace map.
Sourcepub fn add_namespace(&mut self, namespace: &str, index_in_node_set: u16)
pub fn add_namespace(&mut self, namespace: &str, index_in_node_set: u16)
Add a namespace. index_in_node_set is the index in the NodeSet2 file being loaded.
Sourcepub fn get_index(
&self,
index_in_node_set: u16,
) -> Result<u16, UninitializedIndex>
pub fn get_index( &self, index_in_node_set: u16, ) -> Result<u16, UninitializedIndex>
Get the index of a namespace given its index in a NodeSet2 file.
Sourcepub fn namespaces(&'a self) -> &'a NamespaceMap
pub fn namespaces(&'a self) -> &'a NamespaceMap
Return the inner namespace map.
Auto Trait Implementations§
impl<'a> Freeze for NodeSetNamespaceMapper<'a>
impl<'a> RefUnwindSafe for NodeSetNamespaceMapper<'a>
impl<'a> Send for NodeSetNamespaceMapper<'a>
impl<'a> Sync for NodeSetNamespaceMapper<'a>
impl<'a> Unpin for NodeSetNamespaceMapper<'a>
impl<'a> !UnwindSafe for NodeSetNamespaceMapper<'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