Crate ocaml_gen_derive

source ·
Expand description

This crate is not meant to be imported directly by users. You should import ocaml-gen instead.

ocaml-gen-derive adds a number of derives to make ocaml-gen easier to use. Refer to the ocaml-gen documentation.

Attribute Macros

Derive Macros

  • Derives implementations for OCamlDesc and OCamlBinding on a custom type For example:
  • 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:
  • The Struct derive macro. It generates implementations of ToOCaml and OCamlBinding on a struct. The type must implement ocaml::IntoValue and ocaml::FromValue