pub unsafe trait FromValue {
// Required method
fn from_value(v: Value) -> Self;
}
Expand description
FromValue
is used to convert from OCaml values to Rust types
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
Required Methods§
Sourcefn from_value(v: Value) -> Self
fn from_value(v: Value) -> Self
Convert from OCaml value
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.