Struct ra_ap_syntax::SyntaxNodePtr [−][src]
pub struct SyntaxNodePtr { /* fields omitted */ }
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
“Dereference” the pointer to get the node it points to.
Panics if node is not found, so make sure that root
syntax tree is
equivalent (is build from the same text) to the tree which was
originally used to get this SyntaxNodePtr
.
The complexity is linear in the depth of the tree and logarithmic in
tree width. As most trees are shallow, thinking about this as
O(log(N))
in the size of the tree is not too wrong!
Trait Implementations
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for SyntaxNodePtr
impl Send for SyntaxNodePtr
impl Sync for SyntaxNodePtr
impl Unpin for SyntaxNodePtr
impl UnwindSafe for SyntaxNodePtr
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.