Skip to main content

node_keys

Function node_keys 

Source
pub fn node_keys(pointer: &str) -> Option<Vec<KeyInfo>>
Expand description

The keys this module’s key model allows at the node pointer identifies, in [Node::fields]’s own declaration order — the same model lint_view_definition’s unknown-key/missing-required/wrong-type checks are built on, exposed so a caller (a completion endpoint, in particular) can answer “what keys are valid here” without duplicating it.

The node is resolved from pointer alone — no document is walked: "" is the document root; each /-separated segment that names an object key steps into that key’s own nested node (an Object/ObjectArray field); a segment made entirely of ASCII digits is skipped instead, since it names an array index, not a key — so /select/0/column/1 (one column object) and /select/0/column (the array containing it) resolve to the same node. Returns None once a segment names a key this module’s model doesn’t recognize, or one whose value is a scalar or [Kind::Any] — neither has keys of its own to report.