Struct mun_syntax::SyntaxNodePtr
source · pub struct SyntaxNodePtr { /* private fields */ }
Expand description
A pointer to a syntax node inside a file. It can be used to remember a specific node across reparses of the same file.
Implementations§
source§impl SyntaxNodePtr
impl SyntaxNodePtr
pub fn new(node: &SyntaxNode) -> SyntaxNodePtr
pub fn to_node(&self, root: &SyntaxNode) -> SyntaxNode
pub fn range(&self) -> TextRange
pub fn kind(&self) -> SyntaxKind
Trait Implementations§
source§impl Clone for SyntaxNodePtr
impl Clone for SyntaxNodePtr
source§fn clone(&self) -> SyntaxNodePtr
fn clone(&self) -> SyntaxNodePtr
Returns a copy 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 SyntaxNodePtr
impl Debug for SyntaxNodePtr
source§impl<N: AstNode> From<AstPtr<N>> for SyntaxNodePtr
impl<N: AstNode> From<AstPtr<N>> for SyntaxNodePtr
source§fn from(ptr: AstPtr<N>) -> SyntaxNodePtr
fn from(ptr: AstPtr<N>) -> SyntaxNodePtr
Converts to this type from the input type.