pub fn edit_layout(
pref: Pref,
f: impl FnOnce(&mut RailLayout) -> Result<(), String>,
) -> Result<(RailLayout, bool), String>Expand description
Load, change and commit one layout, one edit at a time: commands run on several threads, and two read-modify-writes interleaved would drop one of them. Returns the layout and whether anything moved (nothing is written when nothing did).