pub struct CompletionItem {
pub label: String,
pub kind: CompletionItemKind,
pub detail: Option<String>,
pub documentation: Option<String>,
pub sort_text: Option<String>,
pub filter_text: Option<String>,
pub insert_text: String,
pub score: f32,
pub additional_edits: Vec<TextEdit>,
}Expand description
Represents a single completion suggestion
Fields§
§label: String§kind: CompletionItemKind§detail: Option<String>§documentation: Option<String>§sort_text: Option<String>§filter_text: Option<String>§insert_text: String§score: f32§additional_edits: Vec<TextEdit>Implementations§
Source§impl CompletionItem
impl CompletionItem
pub fn new(label: String, kind: CompletionItemKind, insert_text: String) -> Self
pub fn with_detail(self, detail: String) -> Self
pub fn with_documentation(self, documentation: String) -> Self
pub fn with_score(self, score: f32) -> Self
Trait Implementations§
Source§impl Clone for CompletionItem
impl Clone for CompletionItem
Source§fn clone(&self) -> CompletionItem
fn clone(&self) -> CompletionItem
Returns a duplicate 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
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