[][src]Macro ocaml_interop::impl_from_ocaml_variant

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

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

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

Examples

TODO