Struct ocaml_interop::BoxRoot[][src]

pub struct BoxRoot<T: 'static> { /* fields omitted */ }

BoxRoot<T> is a container for a rooted OCaml<T> value.

Implementations

impl<T> BoxRoot<T>[src]

pub fn new(val: OCaml<'_, T>) -> BoxRoot<T>[src]

Creates a new root from an OCaml<T> value.

pub fn get<'a>(&self, cr: &'a OCamlRuntime) -> OCaml<'a, T>[src]

Gets the value stored in this root as an OCaml<T>.

pub fn keep<'tmp>(&'tmp mut self, val: OCaml<'_, T>) -> OCamlRef<'tmp, T>[src]

Roots the OCaml value val, returning an OCamlRef<T>.

Trait Implementations

impl<T> Deref for BoxRoot<T>[src]

type Target = OCamlCell<T>

The resulting type after dereferencing.

impl<T> Drop for BoxRoot<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for BoxRoot<T> where
    T: RefUnwindSafe

impl<T> !Send for BoxRoot<T>

impl<T> !Sync for BoxRoot<T>

impl<T> Unpin for BoxRoot<T> where
    T: Unpin

impl<T> UnwindSafe for BoxRoot<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.