Skip to content

chaotic: IsConvertible helper function for string enums#1157

Open
rsaddatimov wants to merge 4 commits intouserver-framework:developfrom
rsaddatimov:feature/chaotic-enum-is-valid
Open

chaotic: IsConvertible helper function for string enums#1157
rsaddatimov wants to merge 4 commits intouserver-framework:developfrom
rsaddatimov:feature/chaotic-enum-is-valid

Conversation

@rsaddatimov
Copy link
Copy Markdown


Note: by creating a PR or an issue you automatically agree to the CLA. See CONTRIBUTING.md. Feel free to remove this note, the agreement holds.

{% endif %}
{% endmacro %}

{% macro generate_isvalid_definition(type) %}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For what cases this function is required? What is the motivation of this PR?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the protobuf's bool Enum_IsValid() and bool Enum_Parse() functions

Right now there is no way to perform enum validity check having string value, FromString throws

@rsaddatimov rsaddatimov changed the title chaotic: IsValid helper function for string enums chaotic: IsConvertible helper function for string enums Mar 26, 2026
@rsaddatimov rsaddatimov force-pushed the feature/chaotic-enum-is-valid branch from 4675662 to 9742c87 Compare March 27, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants