Skip to content

[semantic-conventions] provide constants for literal string values to support use as match conditions #685

@polivbr

Description

@polivbr

Currently, the Key values in the semantic conventions crate cannot be used as conditions inside of a match expression because the inner Cow does not derive PartialEq and Eq.

While it would be nice to be able to use the Keys directly as match conditions, I appreciate that moving away from a Cow based implementation isn't feasible.

What I think would be a workable alternative would be to have constants not only for the Keys, but for the the literal strings used to construct the Keys. With those, the string constants could be used as match conditions even if the Keys cannot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-commonArea:common issues that not related to specific pillar

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions