See this comment I left on #2668 after I saw @jamesmunns hand-implementing Count for a struct because it was a struct:
Oh, huh, I think this is necessary because the counters crate doesn't support deriving Count for a struct, even if it has count(Children) on a field that implements Count? It could be worth adding that to better support cases like this (not in this PR, I'll go make a ticket).
Originally posted by @hawkw in #2668 (comment)
At a first glance this didn't really seem worth having a derive that worked on structs because what would you count about them, but sometimes they have child fields that are countable, and it's nicer to not have to hand write that.
See this comment I left on #2668 after I saw @jamesmunns hand-implementing
Countfor a struct because it was a struct:At a first glance this didn't really seem worth having a derive that worked on structs because what would you count about them, but sometimes they have child fields that are countable, and it's nicer to not have to hand write that.