Skip to main content

parse_path_pattern

Function parse_path_pattern 

Source
pub fn parse_path_pattern(path: &str) -> DocumentResult<Vec<PatternSegment>>
Expand description

Parse a path in which a bare * segment means “each child here”.

Reading one field across a collection was three steps — enumerate the children, append the field to each address, then read them — and the middle step was string surgery on this grammar’s own output. A pattern says it directly: package.*.name.

A literal star is still addressable as \*, so no document becomes unreachable by reserving the bare form.