Skip to main content

validate_patch_path

Function validate_patch_path 

Source
pub fn validate_patch_path(path: &str) -> Result<Vec<PathSeg>, String>
Expand description

Validate and split a patch path (a.b[0].c) into segments. Keys follow identifier syntax (ASCII letter or _ first, then ASCII alphanumerics or _); an index suffix [n] may repeat (a[0][1] walks nested arrays). Empty paths/segments, malformed brackets, and non-integer indices are E019 at parse time; missing targets are W004 at apply.