pub struct TextEdit {
pub start_line: u32,
pub start_char: u32,
pub end_line: u32,
pub end_char: u32,
pub before: String,
pub after: String,
pub provenance: Provenance,
pub extensions: BTreeMap<String, Value>,
}Expand description
One exact replacement over the original source text.
Fields§
§start_line: u32§start_char: u32§end_line: u32§end_char: u32§before: String§after: String§provenance: Provenance§extensions: BTreeMap<String, Value>Implementations§
Source§impl TextEdit
impl TextEdit
pub fn replace( range: TextRange, before: impl Into<String>, after: impl Into<String>, provenance: impl AsRef<str>, ) -> Self
pub fn insert( position: Position, after: impl Into<String>, provenance: impl AsRef<str>, ) -> Self
pub fn delete( range: TextRange, before: impl Into<String>, provenance: impl AsRef<str>, ) -> Self
pub const fn range(&self) -> TextRange
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
impl StructuralPartialEq for TextEdit
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