Skip to content

want to derive counters::Count for structs when they have count(children)able enum fields #2674

Description

@hawkw

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    👋 good first issueGood for newcomers.developer-experienceFixing this would have a positive impact on developer experience

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions