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§

func
A macro to create OCaml bindings for a function that uses #[ocaml::func]

Derive Macros§

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