There are some proposed builder guidelines which indicate that &mut self
should be preferred unless there’s a reason to do so otherwise, so I would personally prefer to see these as &mut self
and perhaps add future convenience methods to handle the fold
case better. For example we could add f.debug_map().entries(self)
where the entries
method took I: IntoIterator, ...
.
I’m kinda ambivalent about debug_tuple
and debug_tuple_struct
as one would also debug tuples themselves with debug_tuple
(and an empty name), and I also don’t have a super strong opinion about field
vs entry
. I agree that the current terms match the colloquial usage, but it would perhaps be nice to select a name which is both consistent an colloquial (not sure if this exists though).