pub struct NamespacePageFactory<'a> { /* private fields */ }Expand description
Arena-backed page array of Cell<NamespaceNode>.
Mirrors NodePages but for namespace bindings.
Implementations§
Source§impl<'a> NamespacePageFactory<'a>
impl<'a> NamespacePageFactory<'a>
Sourcepub fn alloc(&mut self) -> Option<NsRef>
pub fn alloc(&mut self) -> Option<NsRef>
Allocates the next namespace slot and returns its NsRef.
Returns None if the index would reach u32::MAX (reserved as NULL).
Sourcepub fn get(&self, ns_ref: NsRef) -> NamespaceNode
pub fn get(&self, ns_ref: NsRef) -> NamespaceNode
Reads the namespace node at the given reference.
Sourcepub fn set(&self, ns_ref: NsRef, node: NamespaceNode)
pub fn set(&self, ns_ref: NsRef, node: NamespaceNode)
Writes a namespace node at the given reference (interior mutability).
Sourcepub fn iter_chain(&self, head: NsRef) -> NamespaceChain<'_, 'a> ⓘ
pub fn iter_chain(&self, head: NsRef) -> NamespaceChain<'_, 'a> ⓘ
Returns an iterator over the chain starting at head.
Yields (prefix, namespace_uri) pairs. An NsRef::NULL head
produces an empty iterator.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for NamespacePageFactory<'a>
impl<'a> !Send for NamespacePageFactory<'a>
impl<'a> !Sync for NamespacePageFactory<'a>
impl<'a> !UnwindSafe for NamespacePageFactory<'a>
impl<'a> Freeze for NamespacePageFactory<'a>
impl<'a> Unpin for NamespacePageFactory<'a>
impl<'a> UnsafeUnpin for NamespacePageFactory<'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