pub struct CompletionItem {
Show 14 fields pub label: String, pub kind: Option<CompletionItemKind>, pub detail: Option<String>, pub documentation: Option<Documentation>, pub deprecated: Option<bool>, pub preselect: Option<bool>, pub sort_text: Option<String>, pub filter_text: Option<String>, pub insert_text: Option<String>, pub insert_text_format: Option<InsertTextFormat>, pub text_edit: Option<TextEdit>, pub additional_text_edits: Option<Vec<TextEdit>>, pub command: Option<Command>, pub data: Option<Value>,
}

Fields

label: String

The label of this completion item. By default also the text that is inserted when selecting this completion.

kind: Option<CompletionItemKind>

The kind of this completion item. Based of the kind an icon is chosen by the editor.

detail: Option<String>

A human-readable string with additional information about this item, like type or symbol information.

documentation: Option<Documentation>

A human-readable string that represents a doc-comment.

deprecated: Option<bool>

Indicates if this item is deprecated.

preselect: Option<bool>

Select this item when showing.

sort_text: Option<String>

A string that shoud be used when comparing this item with other items. When falsy the label is used.

filter_text: Option<String>

A string that should be used when filtering a set of completion items. When falsy the label is used.

insert_text: Option<String>

A string that should be inserted a document when selecting this completion. When falsy the label is used.

insert_text_format: Option<InsertTextFormat>

The format of the insert text. The format applies to both the insertText property and the newText property of a provided textEdit.

text_edit: Option<TextEdit>

An edit which is applied to a document when selecting this completion. When an edit is provided the value of insertText is ignored.

additional_text_edits: Option<Vec<TextEdit>>

An optional array of additional text edits that are applied when selecting this completion. Edits must not overlap with the main edit nor with themselves.

command: Option<Command>

An optional command that is executed after inserting this completion. Note that additional modifications to the current document should be described with the additionalTextEdits-property.

data: Option<Value>

An data entry field that is preserved on a completion item between a completion and a completion resolve request.

Implementations

Create a CompletionItem with the minimum possible info (label and detail).

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more

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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.