pub struct CompletionItem {
pub label: String,
pub insert_text: Option<String>,
pub is_snippet: bool,
pub kind: CompletionKind,
pub detail: Option<String>,
}Expand description
A single completion suggestion.
Fields§
§label: StringThe text displayed in the completion popup.
insert_text: Option<String>The text to actually insert (defaults to label when None).
is_snippet: boolWhether insert_text uses LSP snippet syntax ($1, ${1:placeholder}, etc.).
kind: CompletionKindWhat kind of thing this item represents.
detail: Option<String>Optional extra description shown in the completion popup.
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 PartialEq for CompletionItem
impl PartialEq 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 UnsafeUnpin 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