pub fn change_own(
path: &Path,
here: &str,
change: impl FnOnce(&mut Switch) -> bool,
) -> Result<Switch, String>Expand description
This device’s own table changed under the file’s lock, the file read
again first: the other devices’ tables, brought by the sharing meanwhile,
stay as they are. change says whether it changed anything; nothing is
written otherwise. A file that does not read is left alone, an error.