Skip to content

Improving allocation cost for Validation #460

@elichai

Description

@elichai

Hi :)
It would be great if we could create a validation without allocating (and also paying for a HashSet when you only have 1/2 entries), as I have a bunch of issuers that I need to differentiate but I don't want to store a bunch of Validation objects and also some of their fields outisde (e.g. duplication across tid/issuer etc in azure)
It would be great if we can enable reference based validation, this can be done via:

  1. A trait Validation (e.g with fn contains_issuer(issuer: &str) -> bool etc. with struct Validation implementing it, and downstream users may implement them however they want.
  2. Use some sort of enums inside Validation or provide a ValidationRef type

If this is something that is desired I can try to propose and implement the desired outcome

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions