Derive Macro ocaml_gen_derive::Enum

source ·
#[derive(Enum)]
Expand description

The Enum derive macro. It generates implementations of ToOCaml and OCamlBinding on an enum type. The type must implement ocaml::IntoValue and ocaml::FromValue For example:

use ocaml_gen::Enum;

#[Enum]
enum MyType {
  // ...
}