Struct rowan::GreenNode [−][src]
#[repr(transparent)]pub struct GreenNode { /* fields omitted */ }
Internal node in the immutable tree. It has other nodes and tokens as children.
Implementations
impl GreenNode
[src]
impl GreenNode
[src]pub fn new<I>(kind: SyntaxKind, children: I) -> GreenNode where
I: IntoIterator<Item = NodeOrToken<GreenNode, GreenToken>>,
I::IntoIter: ExactSizeIterator,
[src]
pub fn new<I>(kind: SyntaxKind, children: I) -> GreenNode where
I: IntoIterator<Item = NodeOrToken<GreenNode, GreenToken>>,
I::IntoIter: ExactSizeIterator,
[src]Creates new Node.
Methods from Deref<Target = GreenNodeData>
pub fn kind(&self) -> SyntaxKind
[src]
pub fn kind(&self) -> SyntaxKind
[src]Kind of this node.
pub fn children(&self) -> Children<'_>ⓘNotable traits for Children<'a>
impl<'a> Iterator for Children<'a> type Item = NodeOrToken<&'a GreenNodeData, &'a GreenTokenData>;
[src]
pub fn children(&self) -> Children<'_>ⓘNotable traits for Children<'a>
impl<'a> Iterator for Children<'a> type Item = NodeOrToken<&'a GreenNodeData, &'a GreenTokenData>;
[src]Children of this node.
#[must_use]pub fn replace_child(
&self,
index: usize,
new_child: NodeOrToken<GreenNode, GreenToken>
) -> GreenNode
[src]
#[must_use]
pub fn replace_child(&self,
index: usize,
new_child: NodeOrToken<GreenNode, GreenToken>
) -> GreenNode
#[must_use]pub fn insert_child(
&self,
index: usize,
new_child: NodeOrToken<GreenNode, GreenToken>
) -> GreenNode
[src]
#[must_use]
pub fn insert_child(&self,
index: usize,
new_child: NodeOrToken<GreenNode, GreenToken>
) -> GreenNode
#[must_use]pub fn remove_child(&self, index: usize) -> GreenNode
[src]
#[must_use]
pub fn remove_child(&self, index: usize) -> GreenNode#[must_use]pub fn splice_children<R, I>(&self, range: R, replace_with: I) -> GreenNode where
R: RangeBounds<usize>,
I: IntoIterator<Item = NodeOrToken<GreenNode, GreenToken>>,
[src]
#[must_use]
pub fn splice_children<R, I>(&self, range: R, replace_with: I) -> GreenNode whereR: RangeBounds<usize>,
I: IntoIterator<Item = NodeOrToken<GreenNode, GreenToken>>,
Trait Implementations
impl Borrow<GreenNodeData> for GreenNode
[src]
impl Borrow<GreenNodeData> for GreenNode
[src]fn borrow(&self) -> &GreenNodeData
[src]
fn borrow(&self) -> &GreenNodeData
[src]Immutably borrows from an owned value. Read more
impl Deref for GreenNode
[src]
impl Deref for GreenNode
[src]type Target = GreenNodeData
type Target = GreenNodeData
The resulting type after dereferencing.
fn deref(&self) -> &GreenNodeData
[src]
fn deref(&self) -> &GreenNodeData
[src]Dereferences the value.
impl<'a> From<&'a GreenNode> for NodeOrToken<&'a GreenNodeData, &'a GreenTokenData>
[src]
impl<'a> From<&'a GreenNode> for NodeOrToken<&'a GreenNodeData, &'a GreenTokenData>
[src]fn from(
node: &'a GreenNode
) -> NodeOrToken<&'a GreenNodeData, &'a GreenTokenData>
[src]
fn from(
node: &'a GreenNode
) -> NodeOrToken<&'a GreenNodeData, &'a GreenTokenData>
[src]Performs the conversion.
impl From<Cow<'_, GreenNodeData>> for GreenNode
[src]
impl From<Cow<'_, GreenNodeData>> for GreenNode
[src]fn from(cow: Cow<'_, GreenNodeData>) -> Self
[src]
fn from(cow: Cow<'_, GreenNodeData>) -> Self
[src]Performs the conversion.
impl From<GreenNode> for NodeOrToken<GreenNode, GreenToken>
[src]
impl From<GreenNode> for NodeOrToken<GreenNode, GreenToken>
[src]fn from(node: GreenNode) -> NodeOrToken<GreenNode, GreenToken>
[src]
fn from(node: GreenNode) -> NodeOrToken<GreenNode, GreenToken>
[src]Performs the conversion.
impl Eq for GreenNode
[src]
impl StructuralEq for GreenNode
[src]
impl StructuralPartialEq for GreenNode
[src]
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
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more