Skip to content

Addition of Entities::num_of_entities function similar to PolicySet::num_of_policies #1523

@ShiromMakkad

Description

@ShiromMakkad

Category

User level API features/changes

Describe the feature you'd like to request

A PolicySet has a num_of_policies function that gets the size of the policy set in constant time. I'd like to do the same to entities, for logging purposes, without iterating through every entity using .iter.

Describe alternatives you've considered

You could use Entities::iter and then run .count, but that's linear time and consumes the iterator.

Additional context

No response

Is this something that you'd be interested in working on?

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestThis issue requets a substantial new featuregood-first-issueGood for newcomers. A smaller issue that someone new to the Cedar codebase should be able to tacklepapercutSmall annoyances in the Cedar SDK. Lower priority fixes than bugs. Smaller than a feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions