Trait ra_ap_syntax::ast::edit::AstNodeEdit [−][src]
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
[src]
#[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
[src]
#[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
[src]
#[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
[src]
#[must_use]
fn replace_descendants<D: AstNode>(&self,
replacement_map: impl IntoIterator<Item = (D, D)>
) -> Self
fn indent_level(&self) -> IndentLevel
[src]
#[must_use]fn indent(&self, level: IndentLevel) -> Self
[src]
#[must_use]
fn indent(&self, level: IndentLevel) -> Self#[must_use]fn dedent(&self, level: IndentLevel) -> Self
[src]
#[must_use]
fn dedent(&self, level: IndentLevel) -> Self#[must_use]fn reset_indent(&self) -> Self
[src]
#[must_use]
fn reset_indent(&self) -> Self