pub struct GreenNode { /* private fields */ }
Expand description
Internal node in the immutable tree. It has other nodes and tokens as children.
Implementations§
Methods from Deref<Target = GreenNodeData>§
sourcepub fn kind(&self) -> SyntaxKind
pub fn kind(&self) -> SyntaxKind
Kind of this node.
pub fn replace_child( &self, index: usize, new_child: NodeOrToken<GreenNode, GreenToken>, ) -> GreenNode
pub fn insert_child( &self, index: usize, new_child: NodeOrToken<GreenNode, GreenToken>, ) -> GreenNode
pub fn remove_child(&self, index: usize) -> GreenNode
pub fn splice_children<R, I>(&self, range: R, replace_with: I) -> GreenNode
Trait Implementations§
source§impl Borrow<GreenNodeData> for GreenNode
impl Borrow<GreenNodeData> for GreenNode
source§fn borrow(&self) -> &GreenNodeData
fn borrow(&self) -> &GreenNodeData
Immutably borrows from an owned value. Read more
source§impl Deref for GreenNode
impl Deref for GreenNode
§type Target = GreenNodeData
type Target = GreenNodeData
The resulting type after dereferencing.
source§fn deref(&self) -> &GreenNodeData
fn deref(&self) -> &GreenNodeData
Dereferences the value.
source§impl<'a> From<&'a GreenNode> for NodeOrToken<&'a GreenNodeData, &'a GreenTokenData>
impl<'a> From<&'a GreenNode> for NodeOrToken<&'a GreenNodeData, &'a GreenTokenData>
source§fn from(
node: &'a GreenNode,
) -> NodeOrToken<&'a GreenNodeData, &'a GreenTokenData>
fn from( node: &'a GreenNode, ) -> NodeOrToken<&'a GreenNodeData, &'a GreenTokenData>
Converts to this type from the input type.
source§impl From<Cow<'_, GreenNodeData>> for GreenNode
impl From<Cow<'_, GreenNodeData>> for GreenNode
source§fn from(cow: Cow<'_, GreenNodeData>) -> Self
fn from(cow: Cow<'_, GreenNodeData>) -> Self
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 for GreenNode
impl PartialEq for GreenNode
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 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)