Struct ocaml_interop::BoxRoot [−][src]
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.
fn deref(&self) -> OCamlRef<'_, T>[src]
impl<T> Drop for BoxRoot<T>[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for BoxRoot<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> !Send for BoxRoot<T>
impl<T> !Sync for BoxRoot<T>
impl<T> Unpin for BoxRoot<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for BoxRoot<T> where
T: UnwindSafe,
T: UnwindSafe,
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>,