pub struct TextChange {
    pub range: Option<Range<Pos>>,
    pub patch: String,
}
Expand description

Native representation of a change that replaces a part of the target text.

Can be converted to and from lsp_types::TextDocumentContentChangeEvent by TextAdapter.

Fields

range: Option<Range<Pos>>

Specifies the part of the text that needs to be replaced. When None the whole text needs to be replaced.

patch: String

The replacement text.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.