pub struct CompletionContext {
pub position: Option<PositionKind>,
pub prefix: String,
pub sibling_field_names: Vec<String>,
pub in_file_variant_names: Vec<String>,
pub in_file_map_keys: Vec<String>,
pub items: Vec<CompletionItem>,
}Expand description
The full completion analysis for a cursor offset (FR-010/FR-011).
Produced by completion_context. Holds the structural PositionKind, the
in-progress identifier prefix, the in-file attested identifier pools, and the
already-filtered/ranked items. An empty / ambiguous context
yields an empty items list and PositionKind::Value is not assumed —
position is None (FR-014).
Fields§
§position: Option<PositionKind>The structural position of the cursor, or None for an empty / ambiguous
context where no single kind resolves (then items is empty).
prefix: StringThe identifier fragment immediately left of the cursor (may be empty).
sibling_field_names: Vec<String>Field names already present in the enclosing (or like) struct(s).
in_file_variant_names: Vec<String>Enum-variant identifiers seen anywhere in the document.
in_file_map_keys: Vec<String>Map keys (identifier-like) seen anywhere in the document.
items: Vec<CompletionItem>The ranked, prefix-filtered suggestions (empty for an empty/ambiguous context). Always ordered by kind then alphabetically, all below the literal.
Trait Implementations§
Source§impl Clone for CompletionContext
impl Clone for CompletionContext
Source§fn clone(&self) -> CompletionContext
fn clone(&self) -> CompletionContext
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more