pub struct NamespaceStack { /* private fields */ }Expand description
A stack of open namespaces, used during parsing.
Implementations§
Source§impl NamespaceStack
impl NamespaceStack
Sourcepub fn pop(&mut self) -> Option<String>
pub fn pop(&mut self) -> Option<String>
Pop the top namespace. Returns the popped name, or None if empty.
Sourcepub fn current_path(&self) -> String
pub fn current_path(&self) -> String
The current fully-qualified namespace path (dot-separated).
Sourcepub fn is_top_level(&self) -> bool
pub fn is_top_level(&self) -> bool
Whether the stack is empty (top-level).
Trait Implementations§
Source§impl Clone for NamespaceStack
impl Clone for NamespaceStack
Source§fn clone(&self) -> NamespaceStack
fn clone(&self) -> NamespaceStack
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NamespaceStack
impl Debug for NamespaceStack
Source§impl Default for NamespaceStack
impl Default for NamespaceStack
Source§fn default() -> NamespaceStack
fn default() -> NamespaceStack
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NamespaceStack
impl RefUnwindSafe for NamespaceStack
impl Send for NamespaceStack
impl Sync for NamespaceStack
impl Unpin for NamespaceStack
impl UnsafeUnpin for NamespaceStack
impl UnwindSafe for NamespaceStack
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