pub struct InlineCompletionContext {
pub trigger_kind: InlineCompletionTriggerKind,
pub selected_completion_info: Option<SelectedCompletionInfo>,
}Expand description
Provides information about the context in which an inline completion was requested.
@since 3.18.0
Fields§
§trigger_kind: InlineCompletionTriggerKindDescribes how the inline completion was triggered.
selected_completion_info: Option<SelectedCompletionInfo>Provides information about the currently selected item in the autocomplete widget if it is visible.
If set, provided inline completions must extend the text of the
selected item and use the same range, otherwise they are not shown as
preview.
As an example, if the document text is console. and the selected item
is .log replacing the . in the document, the inline completion must
also replace . and start with .log, for example .log().
Inline completion providers are requested again whenever the selected item changes.
Trait Implementations§
Source§impl Clone for InlineCompletionContext
impl Clone for InlineCompletionContext
Source§fn clone(&self) -> InlineCompletionContext
fn clone(&self) -> InlineCompletionContext
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 InlineCompletionContext
impl Debug for InlineCompletionContext
Source§impl<'de> Deserialize<'de> for InlineCompletionContext
impl<'de> Deserialize<'de> for InlineCompletionContext
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 InlineCompletionContext
impl PartialEq for InlineCompletionContext
Source§impl Serialize for InlineCompletionContext
impl Serialize for InlineCompletionContext
impl Eq for InlineCompletionContext
impl StructuralPartialEq for InlineCompletionContext
Auto Trait Implementations§
impl Freeze for InlineCompletionContext
impl RefUnwindSafe for InlineCompletionContext
impl Send for InlineCompletionContext
impl Sync for InlineCompletionContext
impl Unpin for InlineCompletionContext
impl UnsafeUnpin for InlineCompletionContext
impl UnwindSafe for InlineCompletionContext
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