Macro ocaml_interop::impl_conv_ocaml_variant [−][src]
macro_rules! impl_conv_ocaml_variant {
($rust_typ : ty => $ocaml_typ : ty
{
$($($tag : ident) :: +
$(($($slot_name : ident : $slot_typ : ty), + $(,) ?)) ?
$(=> $conv : expr) ?), + $(,) ?
}) => { ... };
($both_typ : ty { $($t : tt) * }) => { ... };
}
Expand description
Implements conversion between a Rust enum and an OCaml variant.
See the impl_to_ocaml_variant!
and impl_from_ocaml_variant!
macros
for more details.