Wrap a function in a Native Implemented Function (NIF) implementation,
so that it can be called from Elixir,
with all encoding and decoding steps done automatically.
Implementation of the NifTaggedEnum macro that lets the user annotate an enum that will
generate elixir values when encoded. This can be used for any rust enums and will generate
three types of values based on the kind of the enum. For example from the test code: