[][src]Trait ra_ap_syntax::ast::edit::AstNodeEdit

pub trait AstNodeEdit: AstNode + Clone + Sized {
#[must_use]    fn insert_children(
        &self,
        position: InsertPosition<SyntaxElement>,
        to_insert: impl IntoIterator<Item = SyntaxElement>
    ) -> Self { ... }
#[must_use] fn replace_children(
        &self,
        to_replace: RangeInclusive<SyntaxElement>,
        to_insert: impl IntoIterator<Item = SyntaxElement>
    ) -> Self { ... }
#[must_use] fn replace_descendant<D: AstNode>(&self, old: D, new: D) -> Self { ... }
#[must_use] fn replace_descendants<D: AstNode>(
        &self,
        replacement_map: impl IntoIterator<Item = (D, D)>
    ) -> Self { ... }
fn indent_level(&self) -> IndentLevel { ... }
#[must_use] fn indent(&self, level: IndentLevel) -> Self { ... }
#[must_use] fn dedent(&self, level: IndentLevel) -> Self { ... }
#[must_use] fn reset_indent(&self) -> Self { ... } }

Provided methods

#[must_use]fn insert_children(
    &self,
    position: InsertPosition<SyntaxElement>,
    to_insert: impl IntoIterator<Item = SyntaxElement>
) -> Self

#[must_use]fn replace_children(
    &self,
    to_replace: RangeInclusive<SyntaxElement>,
    to_insert: impl IntoIterator<Item = SyntaxElement>
) -> Self

#[must_use]fn replace_descendant<D: AstNode>(&self, old: D, new: D) -> Self

#[must_use]fn replace_descendants<D: AstNode>(
    &self,
    replacement_map: impl IntoIterator<Item = (D, D)>
) -> Self

fn indent_level(&self) -> IndentLevel

#[must_use]fn indent(&self, level: IndentLevel) -> Self

#[must_use]fn dedent(&self, level: IndentLevel) -> Self

#[must_use]fn reset_indent(&self) -> Self

Loading content...

Implementors

impl<N: AstNode + Clone> AstNodeEdit for N[src]

Loading content...