Struct ra_syntax::SyntaxNode
source · Implementations
sourceimpl<'a> SyntaxNode<RefRoot<'a, RaTypes>>
impl<'a> SyntaxNode<RefRoot<'a, RaTypes>>
pub fn leaf_text(self) -> Option<&'a SmolStr>
pub fn ancestors(self) -> impl Iterator<Item = SyntaxNodeRef<'a>>
pub fn descendants(self) -> impl Iterator<Item = SyntaxNodeRef<'a>>
pub fn siblings(
self,
direction: Direction
) -> impl Iterator<Item = SyntaxNodeRef<'a>>
pub fn preorder(self) -> impl Iterator<Item = WalkEvent<SyntaxNodeRef<'a>>>
sourceimpl<R: TreeRoot<RaTypes>> SyntaxNode<R>
impl<R: TreeRoot<RaTypes>> SyntaxNode<R>
pub fn borrowed<'a>(&'a self) -> SyntaxNode<RefRoot<'a>>
pub fn owned(&self) -> SyntaxNode<OwnedRoot>
pub fn kind(&self) -> SyntaxKind
pub fn range(&self) -> TextRange
pub fn text(&self) -> SyntaxText<'_>
pub fn is_leaf(&self) -> bool
pub fn parent(&self) -> Option<SyntaxNode<R>>
pub fn first_child(&self) -> Option<SyntaxNode<R>>
pub fn last_child(&self) -> Option<SyntaxNode<R>>
pub fn next_sibling(&self) -> Option<SyntaxNode<R>>
pub fn prev_sibling(&self) -> Option<SyntaxNode<R>>
pub fn children(&self) -> SyntaxNodeChildren<R>
Trait Implementations
sourceimpl<R: Clone + TreeRoot<RaTypes>> Clone for SyntaxNode<R>
impl<R: Clone + TreeRoot<RaTypes>> Clone for SyntaxNode<R>
sourcefn clone(&self) -> SyntaxNode<R>
fn clone(&self) -> SyntaxNode<R>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<R: TreeRoot<RaTypes>> Debug for SyntaxNode<R>
impl<R: TreeRoot<RaTypes>> Debug for SyntaxNode<R>
sourceimpl<R: TreeRoot<RaTypes>> Hash for SyntaxNode<R>
impl<R: TreeRoot<RaTypes>> Hash for SyntaxNode<R>
sourceimpl<R1, R2> PartialEq<SyntaxNode<R1>> for SyntaxNode<R2>where
R1: TreeRoot<RaTypes>,
R2: TreeRoot<RaTypes>,
impl<R1, R2> PartialEq<SyntaxNode<R1>> for SyntaxNode<R2>where
R1: TreeRoot<RaTypes>,
R2: TreeRoot<RaTypes>,
sourcefn eq(&self, other: &SyntaxNode<R1>) -> bool
fn eq(&self, other: &SyntaxNode<R1>) -> bool
impl<R: Copy + TreeRoot<RaTypes>> Copy for SyntaxNode<R>
impl<R: TreeRoot<RaTypes>> Eq for SyntaxNode<R>
Auto Trait Implementations
impl<R = OwnedRoot<RaTypes>> !RefUnwindSafe for SyntaxNode<R>
impl<R> Send for SyntaxNode<R>
impl<R> Sync for SyntaxNode<R>
impl<R> Unpin for SyntaxNode<R>where
R: Unpin,
impl<R = OwnedRoot<RaTypes>> !UnwindSafe for SyntaxNode<R>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more