Skip to main content

encode_meta

Function encode_meta 

Source
pub fn encode_meta(meta: &LspCompletionMeta) -> Vec<u8> ⓘ
Expand description

CSM.8b: LspCompletionMeta + LSP_COMPLETION_KIND_ID moved into lattice-lsp::completion so the type lives in the crate that owns lsp-types. The host imports them via this re-export – candidate payloads carry the serde- encoded form directly (encode_meta / decode_meta) so the parallel App.insert_completion_lsp_meta sidecar is gone; the candidate IS the metadata. Encode meta to a JSON byte blob suitable for embedding in a RawCandidate’s CandidateData::Extension::payload. Errors are caller-handled by panicking in the source’s produce path – a serialize failure on lsp-types output indicates a malformed item, which the supervisor should have rejected before we got here.