pub struct LspCompletionMeta {Show 17 fields
pub label: String,
pub insert_text: String,
pub filter_text: Option<String>,
pub sort_text: Option<String>,
pub detail: Option<String>,
pub documentation: Option<String>,
pub kind: Option<CompletionItemKind>,
pub deprecated: bool,
pub preselect: bool,
pub commit_characters: Vec<char>,
pub additional_text_edits: Vec<TextEdit>,
pub command: Option<Command>,
pub insert_text_format: InsertTextFormat,
pub replace_range: Option<Range>,
pub server_id: String,
pub original_item: CompletionItem,
pub resolved: bool,
}Expand description
LSP-sourced insert-completion candidate metadata. Carried
inside the RawCandidate’s CandidateData::Extension
payload as a JSON blob (see encode_meta / decode_meta).
Replaces the pre-CSM.8b host-side sidecar – the candidate
IS the metadata; the host decodes on demand.
JSON over bincode keeps the payload debuggable and avoids
pinning lsp-types’ bincode behavior. Decoding cost is
amortised by the host’s per-popup decoded cache (rebuilt
only when state.raw mutates), so the per-frame docs /
glyph / commit-char paths don’t repeatedly deserialise.
Fields§
§label: String§insert_text: String§filter_text: Option<String>§sort_text: Option<String>§detail: Option<String>§documentation: Option<String>§kind: Option<CompletionItemKind>§deprecated: bool§preselect: bool§commit_characters: Vec<char>§additional_text_edits: Vec<TextEdit>§command: Option<Command>§insert_text_format: InsertTextFormat§replace_range: Option<Range>Range to replace, when the LSP item carries
textEdit.range. None ⇒ host uses the popup’s anchor
/ cursor as the replace bounds.
server_id: StringServer that produced the item. Resolve / executeCommand
route back to the same server. Stored as String for
serde-friendliness; the host can Arc::from it on
decode if it wants the shared form back.
original_item: CompletionItemOriginal server CompletionItem preserved verbatim so
completionItem/resolve round-trips it unchanged
(servers use the data field as an opaque blob;
mutating any field would break resolve).
resolved: boolTrue once completionItem/resolve has filled in the
missing fields. Subsequent docs-popup focuses don’t
re-fire the resolve.
Trait Implementations§
Source§impl Clone for LspCompletionMeta
impl Clone for LspCompletionMeta
Source§fn clone(&self) -> LspCompletionMeta
fn clone(&self) -> LspCompletionMeta
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LspCompletionMeta
impl Debug for LspCompletionMeta
Source§impl<'de> Deserialize<'de> for LspCompletionMeta
impl<'de> Deserialize<'de> for LspCompletionMeta
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>,
Auto Trait Implementations§
impl Freeze for LspCompletionMeta
impl RefUnwindSafe for LspCompletionMeta
impl Send for LspCompletionMeta
impl Sync for LspCompletionMeta
impl Unpin for LspCompletionMeta
impl UnsafeUnpin for LspCompletionMeta
impl UnwindSafe for LspCompletionMeta
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more