Struct lsp_types::WorkspaceEdit[][src]

pub struct WorkspaceEdit {
    pub changes: Option<HashMap<Url, Vec<TextEdit>>>,
    pub document_changes: Option<DocumentChanges>,
    pub change_annotations: Option<HashMap<ChangeAnnotationIdentifier, ChangeAnnotation>>,
}

A workspace edit represents changes to many resources managed in the workspace. The edit should either provide changes or documentChanges. If the client can handle versioned document edits and if documentChanges are present, the latter are preferred over changes.

Fields

changes: Option<HashMap<Url, Vec<TextEdit>>>

Holds changes to existing resources.

document_changes: Option<DocumentChanges>

Depending on the client capability workspace.workspaceEdit.resourceOperations document changes are either an array of TextDocumentEdits to express changes to n different text documents where each text document edit addresses a specific version of a text document. Or it can contain above TextDocumentEdits mixed with create, rename and delete file / folder operations.

Whether a client supports versioned document edits is expressed via workspace.workspaceEdit.documentChanges client capability.

If a client neither supports documentChanges nor workspace.workspaceEdit.resourceOperations then only plain TextEdits using the changes property are supported.

change_annotations: Option<HashMap<ChangeAnnotationIdentifier, ChangeAnnotation>>

A map of change annotations that can be referenced in AnnotatedTextEdits or create, rename and delete file / folder operations.

Whether clients honor this property depends on the client capability workspace.changeAnnotationSupport.

@since 3.16.0

Implementations

impl WorkspaceEdit[src]

pub fn new(changes: HashMap<Url, Vec<TextEdit>>) -> WorkspaceEdit[src]

Trait Implementations

impl Clone for WorkspaceEdit[src]

impl Debug for WorkspaceEdit[src]

impl Default for WorkspaceEdit[src]

impl<'de> Deserialize<'de> for WorkspaceEdit[src]

impl Eq for WorkspaceEdit[src]

impl PartialEq<WorkspaceEdit> for WorkspaceEdit[src]

impl Serialize for WorkspaceEdit[src]

impl StructuralEq for WorkspaceEdit[src]

impl StructuralPartialEq for WorkspaceEdit[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.