I have an enum like
julia> @enum Fruit apple=1 orange=2 kiwi=3
I can check that
apple is a
julia> apple isa Fruit true
But can’t check if 3 is an “allowed” value (ie a value which is used by this enum)
julia> 4 isa Fruit false julia> 3 isa Fruit false
3 in Fruit or
3 in keys(Fruit) but enum are not iterable.
I haven’t dive into Enum internals… but maybe someone here can help.
(and docstring could probably be improved)