pub struct NamespaceNode { /* private fields */ }Expand description
Typed namespace CST wrapper.
Args: None.
Returns: Stable accessors for namespace name and span.
Implementations§
Source§impl NamespaceNode
impl NamespaceNode
Sourcepub fn cast(syntax: SyntaxNode) -> Option<Self>
pub fn cast(syntax: SyntaxNode) -> Option<Self>
Casts a raw rowan node into a typed namespace wrapper.
Args: syntax: Raw rowan syntax node.
Returns:
Typed namespace wrapper when the kind matches NamespaceBlock.
Trait Implementations§
Source§impl Clone for NamespaceNode
impl Clone for NamespaceNode
Source§fn clone(&self) -> NamespaceNode
fn clone(&self) -> NamespaceNode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NamespaceNode
impl !RefUnwindSafe for NamespaceNode
impl !Send for NamespaceNode
impl !Sync for NamespaceNode
impl Unpin for NamespaceNode
impl UnsafeUnpin for NamespaceNode
impl !UnwindSafe for NamespaceNode
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