pub struct CompletionItem {
pub label: String,
pub insert_text: String,
pub kind: CompletionKind,
pub rank: u32,
}Expand description
A single low-confidence completion suggestion (FR-011/FR-012).
Always ranked below the user’s literal input (rank is a strictly
positive distance-from-top; the literal conceptually occupies rank 0), so it
is never preselected and never auto-accepts.
Fields§
§label: StringThe text shown to the user in the popup.
insert_text: StringThe text inserted on acceptance — syntactically valid in its position so the result round-trips through the CST.
kind: CompletionKindThe suggestion’s classification (display hint + primary sort key).
rank: u32Deterministic rank, strictly >= 1 (below the user’s literal input at
rank 0). Lower ranks sort first; ranks follow the kind-then-alpha order.
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 (const: unstable) · 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
impl Eq 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