#[non_exhaustive]pub enum PositionKind {
StructField,
ListElement,
MapKey,
MapValue,
Tuple,
Value,
}Expand description
Where the cursor sits inside the RON structure (FR-010).
Derived purely from the enclosing CST construct. PositionKind::Value is the
general “a value is expected here” position (top-level value, list element of a
freshly-opened list, a struct/map value slot, …) where any RON value — and so
Some / None / a variant name — is legal. The more specific kinds carry the
extra structural knowledge that lets completion offer attested field names,
keys, etc.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
StructField
Inside a struct’s parentheses, at a field name position (before the :).
ListElement
Inside a list [ .. ], at an element position.
MapKey
Inside a map { .. }, at a key position (before the :).
MapValue
Inside a map entry, at the value position (after the :).
Tuple
Inside a tuple ( a, b ), at a positional element position.
Value
A generic value position (top-level value, struct/variant payload value, or any spot where a fresh RON value is expected).
Trait Implementations§
Source§impl Clone for PositionKind
impl Clone for PositionKind
Source§fn clone(&self) -> PositionKind
fn clone(&self) -> PositionKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more