enum Change {
Insert(Position, SyntaxElement),
InsertAll(Position, Vec<SyntaxElement>),
Replace(SyntaxElement, Option<SyntaxElement>),
ReplaceWithMany(SyntaxElement, Vec<SyntaxElement>),
ReplaceAll(RangeInclusive<SyntaxElement>, Vec<SyntaxElement>),
}Variants§
Insert(Position, SyntaxElement)
Inserts a single element at the specified position.
InsertAll(Position, Vec<SyntaxElement>)
Inserts many elements in-order at the specified position.
Replace(SyntaxElement, Option<SyntaxElement>)
Represents both a replace single element and a delete element operation.
ReplaceWithMany(SyntaxElement, Vec<SyntaxElement>)
Replaces a single element with many elements.
ReplaceAll(RangeInclusive<SyntaxElement>, Vec<SyntaxElement>)
Replaces a range of elements with another list of elements. Range will always have start != end.
Implementations§
Source§impl Change
impl Change
fn target_range(&self) -> TextRange
fn target_parent(&self) -> SyntaxNode
fn change_kind(&self) -> ChangeKind
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Change
impl !RefUnwindSafe for Change
impl !Send for Change
impl !Sync for Change
impl Unpin for Change
impl !UnwindSafe for Change
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more