tor_config::Reconfigure infelicities
-
It's marked
#[non_exhaustive], which forces all use sites to handle the_variant, but there is no good way to handle it because an unknownReconfiguremight imply arbitrary semantics that the use site doesn't implement. IMO the enum should simply be made exhaustive. -
cannot_changetakes afield. It's not clear what the string is supposed to be. If it's supposed to be just the field name in a serde config builder struct, then error messages from theartibinary will not include the whole path. So maybe it is supposed to be the path assigned to this field in the whole system, so the use sites are supposed to embed knowledge that's generally spread across the system? There doesn't seem like there would be any way to check that and keep it up to date. -
There is no way to produce
tor_config::ReconfigureError::UnsupportedSituation, which is the error one needs to make if one has more to explain than simply a particular field being immutable. -
There doesn't appear to be any overview documentation explaining how
Reconfigureis meant to be used, and what role is played by (1) toplevel code handling incoming reconfiguration requests and dispatching to users (2) individual facilities. (I think the intended approach is fairly obvious but it should be documented.)