Struct ocaml_interop::OCamlRuntime[][src]

pub struct OCamlRuntime { /* fields omitted */ }
Expand description

OCaml runtime handle.

Should be initialized once at the beginning of the program and the obtained handle passed around.

Once the handle is dropped, the OCaml runtime will be shutdown.

Implementations

Initializes the OCaml runtime and returns an OCaml runtime handle.

Once the handle is dropped, the OCaml runtime will be shutdown.

Initializes the OCaml runtime.

After the first invocation, this method does nothing.

Recover the runtime handle.

This method is used internally, do not use directly in code, only when writing tests.

Safety

This function is unsafe because the OCaml runtime handle should be obtained once upon initialization of the OCaml runtime and then passed around. This method exists only to ease the authoring of tests.

Release the OCaml runtime lock, call f, and re-acquire the OCaml runtime lock.

Returns the OCaml valued to which this GC tracked reference points to.

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.