pub struct TextEdit {
pub span: Span,
pub replacement: String,
}Expand description
A single span-based text edit against the original source.
span is BYTE-offset based (start_offset/end_offset) against the
CRLF-normalised source the diagnostics were produced from. Offsets always
sit on UTF-8 character boundaries. An empty span (start_offset == end_offset) is an insertion.
Fields§
§span: SpanByte range in the original source to replace.
replacement: StringText spliced in place of the spanned bytes.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TextEdit
impl<'de> Deserialize<'de> for TextEdit
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TextEdit
impl RefUnwindSafe for TextEdit
impl Send for TextEdit
impl Sync for TextEdit
impl Unpin for TextEdit
impl UnsafeUnpin for TextEdit
impl UnwindSafe for TextEdit
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