pub struct TextEdit { /* private fields */ }Expand description
A single byte-range replacement against a source string.
Implementations§
Source§impl TextEdit
impl TextEdit
Sourcepub fn new(span: Span, replacement: impl Into<String>) -> Self
pub fn new(span: Span, replacement: impl Into<String>) -> Self
Create a text edit replacing span with replacement.
Sourcepub fn replacement(&self) -> &str
pub fn replacement(&self) -> &str
The replacement text substituted for Self::span.
Sourcepub const fn is_insertion(&self) -> bool
pub const fn is_insertion(&self) -> bool
Whether this edit inserts text at a zero-width byte offset.
Trait Implementations§
impl Eq for TextEdit
impl StructuralPartialEq for TextEdit
Auto Trait Implementations§
impl Forget for TextEdit
impl Freeze for TextEdit
impl Move for TextEdit
impl RefUnwindSafe for TextEdit
impl Send for TextEditwhere
RawVecInner: Send,
impl Sync for TextEditwhere
RawVecInner: Sync,
impl Unpin for TextEdit
impl UnsafeUnpin for TextEdit
impl UnwindSafe for TextEditwhere
RawVecInner: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.