pub trait OCamlBinding {
    // Required method
    fn ocaml_binding(
        env: &mut Env,
        rename: Option<&'static str>,
        new_type: bool
    ) -> String;
}
Expand description

OCamlBinding is the trait implemented by types to generate their OCaml bindings. It is usually derived automatically via the Struct macro, or the CustomType macro for custom types. For functions, refer to the func macro.

Required Methods§

source

fn ocaml_binding( env: &mut Env, rename: Option<&'static str>, new_type: bool ) -> String

will generate the OCaml bindings for a type (called root type). It takes the current environment Env, as well as an optional name (if you wish to rename the type in OCaml).

Object Safety§

This trait is not object safe.

Implementors§