[−][src]Struct ocaml_interop::OCamlRuntime
OCaml runtime handle.
Implementations
impl OCamlRuntime
[src]
pub fn init() -> Self
[src]
Initializes the OCaml runtime and returns an OCaml runtime handle.
pub fn init_persistent()
[src]
Initializes the OCaml runtime.
pub unsafe fn recover_handle() -> &'static mut Self
[src]
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.
pub fn releasing_runtime<T, F>(&mut self, f: F) -> T where
F: FnOnce() -> T,
[src]
F: FnOnce() -> T,
Release the OCaml runtime lock, call f
, and re-acquire the OCaml runtime lock.
pub fn get<'tmp, T>(&'tmp self, reference: OCamlRef<'_, T>) -> OCaml<'tmp, T>
[src]
Returns the OCaml valued to which this GC tracked reference points to.
Trait Implementations
impl Drop for OCamlRuntime
[src]
Auto Trait Implementations
impl RefUnwindSafe for OCamlRuntime
[src]
impl Send for OCamlRuntime
[src]
impl Sync for OCamlRuntime
[src]
impl Unpin for OCamlRuntime
[src]
impl UnwindSafe for OCamlRuntime
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,