pub struct Candidate {
pub label: String,
pub description: String,
pub replacement: String,
pub cursor: usize,
pub acceptance: Option<CompletionAcceptance>,
}Expand description
A single completion candidate surfaced by a CompletionSource.
Fields§
§label: StringShort text shown in the menu’s left column.
description: StringDescription shown to the right of the label.
replacement: StringBuffer contents to install when this candidate is selected for preview.
cursor: usizeUTF-8 byte offset at which to place the prompt cursor in replacement.
acceptance: Option<CompletionAcceptance>Optional buffer replacement installed only when the user accepts this candidate instead of merely previewing it.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Candidate
impl RefUnwindSafe for Candidate
impl Send for Candidate
impl Sync for Candidate
impl Unpin for Candidate
impl UnsafeUnpin for Candidate
impl UnwindSafe for Candidate
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