pub struct ListPatch {
pub replace_all: Option<Vec<String>>,
pub clear: bool,
pub remove: Vec<String>,
pub replace: Vec<(String, String)>,
pub after: Vec<(String, Vec<String>)>,
pub before: Vec<(String, Vec<String>)>,
pub prepend: Vec<String>,
pub add: Vec<String>,
}Expand description
A patch over an inherited ordered string list. Either a wholesale
replace_all (a plain TOML array) or a set of in-place
edits applied to the inherited base, in this order: clear → remove →
replace → after / before → prepend → add. The result is
de-duplicated, keeping the first occurrence (order-stable).
Fields§
§replace_all: Option<Vec<String>>Plain-array form: replace the inherited list outright (then dedup).
clear: boolStart from an empty list instead of the inherited base.
remove: Vec<String>Drop every element equal to one of these.
replace: Vec<(String, String)>Swap an element in place, preserving its position: (old, new).
after: Vec<(String, Vec<String>)>Insert items immediately after an anchor element: (anchor, items).
No-op if the anchor is absent.
before: Vec<(String, Vec<String>)>Insert items immediately before an anchor element: (anchor, items).
prepend: Vec<String>Insert at the front (before the inherited elements).
add: Vec<String>Append at the end.