Derive Macro ocaml_gen_derive::Struct

source ·
#[derive(Struct)]
Expand description

The Struct derive macro. It generates implementations of ToOCaml and OCamlBinding on a struct. The type must implement ocaml::IntoValue and ocaml::FromValue

For example:

#[ocaml_gen::Struct]
struct MyType {
  // ...
}