pub struct CompletionItem {
pub label: String,
pub length: Option<i64>,
pub start: Option<i64>,
pub text: Option<String>,
pub type_: Option<CompletionItemType>,
}
Expand description
CompletionItems are the suggestions returned from the CompletionsRequest.
Fields§
§label: String
The label of this completion item. By default this is also the text that is inserted when selecting this completion.
length: Option<i64>
This value determines how many characters are overwritten by the completion text. If missing the value 0 is assumed which results in the completion text being inserted.
start: Option<i64>
This value determines the location (in the CompletionsRequest’s ‘text’ attribute) where the completion text is added. If missing the text is added at the location specified by the CompletionsRequest’s ‘column’ attribute.
text: Option<String>
If text is not falsy then it is inserted instead of the label.
type_: Option<CompletionItemType>
The item’s type. Typically the client uses this information to render the item in the UI with an icon.
Trait Implementations§
Source§impl Clone for CompletionItem
impl Clone for CompletionItem
Source§fn clone(&self) -> CompletionItem
fn clone(&self) -> CompletionItem
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CompletionItem
impl Debug for CompletionItem
Source§impl<'de> Deserialize<'de> for CompletionItem
impl<'de> Deserialize<'de> for CompletionItem
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
Source§impl PartialEq for CompletionItem
impl PartialEq for CompletionItem
Source§impl Serialize for CompletionItem
impl Serialize for CompletionItem
impl StructuralPartialEq for CompletionItem
Auto Trait Implementations§
impl Freeze for CompletionItem
impl RefUnwindSafe for CompletionItem
impl Send for CompletionItem
impl Sync for CompletionItem
impl Unpin for CompletionItem
impl UnwindSafe for CompletionItem
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