[][src]Macro ocaml_interop::impl_to_ocaml_variant

macro_rules! impl_to_ocaml_variant {
    ($rust_typ:ty => $ocaml_typ:ty {
        $($t:tt)*
    }) => { ... };
    ($both_typ:ty {
        $($t:tt)*
    }) => { ... };
}

Implements ToOCaml for mapping a Rust enum into an OCaml variant.

The conversion is exhaustive, and requires that every enum case is handled.

It is important that the order remains the same as in the OCaml type declaration.

Examples

TODO