pub enum EditTarget {
Node(SyntaxNode),
TokenSpan {
first: SyntaxToken,
last: SyntaxToken,
},
}Expand description
What an EditOperation acts on (AD-004).
Either a whole SyntaxNode subtree, or a contiguous span of sibling
elements delimited by a first and last token (inclusive). A single-token
edit is a span whose first and last token are the same.
Variants§
Node(SyntaxNode)
A whole node subtree.
TokenSpan
An inclusive span of adjacent siblings, addressed by its first and last token. Both tokens MUST share the same parent node.
Fields
§
first: SyntaxTokenFirst token of the span (inclusive).
§
last: SyntaxTokenLast token of the span (inclusive). May equal first.
Trait Implementations§
Source§impl Clone for EditTarget
impl Clone for EditTarget
Source§fn clone(&self) -> EditTarget
fn clone(&self) -> EditTarget
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EditTarget
impl Debug for EditTarget
impl Eq for EditTarget
Source§impl PartialEq for EditTarget
impl PartialEq for EditTarget
impl StructuralPartialEq for EditTarget
Auto Trait Implementations§
impl !RefUnwindSafe for EditTarget
impl !Send for EditTarget
impl !Sync for EditTarget
impl !UnwindSafe for EditTarget
impl Freeze for EditTarget
impl Unpin for EditTarget
impl UnsafeUnpin for EditTarget
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