pub struct GreenNode { /* private fields */ }Expand description
Node in the green syntax tree.
Implementations§
Source§impl GreenNode
impl GreenNode
Sourcepub fn new<I>(kind: SyntaxKind, children: I) -> GreenNode
pub fn new<I>(kind: SyntaxKind, children: I) -> GreenNode
Create specified kind of green node with given children.
Sourcepub fn kind(&self) -> SyntaxKind
pub fn kind(&self) -> SyntaxKind
Kind of this node.
Sourcepub fn children(
&self,
) -> impl Iterator<Item = NodeOrToken<&GreenNode, &GreenToken>> + Clone
pub fn children( &self, ) -> impl Iterator<Item = NodeOrToken<&GreenNode, &GreenToken>> + Clone
Iterator over the child nodes and tokens of this node.
Sourcepub fn children_len(&self) -> usize
pub fn children_len(&self) -> usize
Number of child nodes and tokens of this node.
Trait Implementations§
Source§impl From<GreenNode> for NodeOrToken<GreenNode, GreenToken>
impl From<GreenNode> for NodeOrToken<GreenNode, GreenToken>
impl Eq for GreenNode
impl StructuralPartialEq for GreenNode
Auto Trait Implementations§
impl Freeze for GreenNode
impl RefUnwindSafe for GreenNode
impl Send for GreenNode
impl Sync for GreenNode
impl Unpin for GreenNode
impl UnsafeUnpin for GreenNode
impl UnwindSafe for GreenNode
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