pub struct NamespaceContext { /* private fields */ }Expand description
Tracks namespace bindings during parsing.
Implementations§
Source§impl NamespaceContext
impl NamespaceContext
Sourcepub fn push_scope(&mut self)
pub fn push_scope(&mut self)
Pushes a new scope for entering an element.
Sourcepub fn resolve(&self, prefix: &str) -> Option<Rc<str>>
pub fn resolve(&self, prefix: &str) -> Option<Rc<str>>
Resolves a prefix to its URI, searching from innermost scope.
Sourcepub fn default_namespace(&self) -> Option<Rc<str>>
pub fn default_namespace(&self) -> Option<Rc<str>>
Returns the default namespace (empty prefix binding).
Sourcepub fn intern_uri(&mut self, uri: &str) -> Rc<str>
pub fn intern_uri(&mut self, uri: &str) -> Rc<str>
Interns a URI string for memory efficiency.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NamespaceContext
impl RefUnwindSafe for NamespaceContext
impl !Send for NamespaceContext
impl !Sync for NamespaceContext
impl Unpin for NamespaceContext
impl UnsafeUnpin for NamespaceContext
impl UnwindSafe for NamespaceContext
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