Skip to main content

with_reserved

Function with_reserved 

Source
pub fn with_reserved(text: &str, paths: &[String]) -> String
Expand description

Record reserved paths in a declaration, keeping every comment.

The file is hand-edited and its comments carry the whole explanation of the four layers, so this rewrites one key textually rather than round-tripping the YAML. A path already recorded is left alone, which is what makes a repeated --reserve idempotent.