[][src]Macro ocaml_interop::ocaml_unpack_variant

macro_rules! ocaml_unpack_variant {
    ($self:ident => {
        $($($tag:ident)::+ $(($($slot_name:ident: $slot_typ:ty),+ $(,)?))? $(=> $conv:expr)?),+ $(,)?
    }) => { ... };
}

Unpacks an OCaml variant and maps it into a Rust enum.

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

Examples

TODO