pub unsafe trait ToValue {
// Required method
fn to_value(&self, rt: &Runtime) -> Value;
}
Expand description
ToValue
is used to convert from Rust types to OCaml values
NOTE: This should only be used after the OCaml runtime has been initialized, when calling
Rust functions from OCaml, the runtime is already initialized otherwise ocaml::Runtime::init
should be used