Skip to content

get_bool and get_int in EnumProperty are undocumented and always return None #313

@fritzrehde

Description

@fritzrehde

When looking at EnumProperty's documentation that get_bool and get_int both always returned None.
My expectation of these way that I could set a bool in a property like so:

    #[strum(props(HideInHelp = "true"))]
    Variant,

and then I thought "true" would get parsed into a bool, and I could just check an Option<bool> with get_bool at runtime.
What I don't understand is why get_bool exists and always returns None. Is the feature not ready/implemented yet, and was accidentally added to the master branch? It should also probably be documented at least with a doc-string to prevent the confusion I ran into.
Thanks for the cool crate!

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