pub struct GreenNode { /* private fields */ }
Expand description
Internal node in the immutable “green” tree. It contains other nodes and tokens as its children.
Implementations§
source§impl GreenNode
impl GreenNode
sourcepub fn new<I>(kind: RawSyntaxKind, children: I) -> GreenNodewhere
I: IntoIterator<Item = NodeOrToken<GreenNode, GreenToken>>,
I::IntoIter: ExactSizeIterator,
pub fn new<I>(kind: RawSyntaxKind, children: I) -> GreenNodewhere I: IntoIterator<Item = NodeOrToken<GreenNode, GreenToken>>, I::IntoIter: ExactSizeIterator,
Creates a new Node.
sourcepub fn kind(&self) -> RawSyntaxKind
pub fn kind(&self) -> RawSyntaxKind
RawSyntaxKind
of this node.
sourcepub fn children(&self) -> GreenNodeChildren<'_> ⓘ
pub fn children(&self) -> GreenNodeChildren<'_> ⓘ
Iterator over all children of this node.
Trait Implementations§
source§impl<'a> From<&'a GreenNode> for NodeOrToken<&'a GreenNode, &'a GreenToken>
impl<'a> From<&'a GreenNode> for NodeOrToken<&'a GreenNode, &'a GreenToken>
source§fn from(node: &'a GreenNode) -> NodeOrToken<&'a GreenNode, &'a GreenToken>
fn from(node: &'a GreenNode) -> NodeOrToken<&'a GreenNode, &'a GreenToken>
Converts to this type from the input type.
source§impl From<GreenNode> for NodeOrToken<GreenNode, GreenToken>
impl From<GreenNode> for NodeOrToken<GreenNode, GreenToken>
source§fn from(node: GreenNode) -> NodeOrToken<GreenNode, GreenToken>
fn from(node: GreenNode) -> NodeOrToken<GreenNode, GreenToken>
Converts to this type from the input type.
source§impl PartialEq<GreenNode> for GreenNode
impl PartialEq<GreenNode> for GreenNode
impl Eq for GreenNode
Auto Trait Implementations§
impl RefUnwindSafe for GreenNode
impl Send for GreenNode
impl Sync for GreenNode
impl Unpin 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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more