Struct ocaml_interop::BoxRoot
source · pub struct BoxRoot<T: 'static> { /* private fields */ }
Expand description
BoxRoot<T>
is a container for a rooted OCaml
<T>
value.
Implementations§
source§impl<T> BoxRoot<T>
impl<T> BoxRoot<T>
sourcepub fn get<'a>(&self, cr: &'a OCamlRuntime) -> OCaml<'a, T>
pub fn get<'a>(&self, cr: &'a OCamlRuntime) -> OCaml<'a, T>
Gets the value stored in this root as an OCaml
<T>
.
source§impl<'c, OCaml1, RetT> BoxRoot<fn(_: OCaml1) -> RetT>
impl<'c, OCaml1, RetT> BoxRoot<fn(_: OCaml1) -> RetT>
sourcepub fn try_call<'a, 'b: 'a, arg1, Rust1>(
&self,
cr: &'c mut OCamlRuntime,
arg1: arg1
) -> Result<OCaml<'c, RetT>, OCaml<'c, OCamlException>>where
arg1: OCamlParam<'a, 'b, Rust1, OCaml1>,
pub fn try_call<'a, 'b: 'a, arg1, Rust1>(
&self,
cr: &'c mut OCamlRuntime,
arg1: arg1
) -> Result<OCaml<'c, RetT>, OCaml<'c, OCamlException>>where
arg1: OCamlParam<'a, 'b, Rust1, OCaml1>,
Calls the OCaml closure, converting the arguments to OCaml if necessary
source§impl<'c, OCaml1, OCaml2, RetT> BoxRoot<fn(_: OCaml1, _: OCaml2) -> RetT>
impl<'c, OCaml1, OCaml2, RetT> BoxRoot<fn(_: OCaml1, _: OCaml2) -> RetT>
sourcepub fn try_call<'a, 'b: 'a, arg1, arg2, Rust1, Rust2>(
&self,
cr: &'c mut OCamlRuntime,
arg1: arg1,
arg2: arg2
) -> Result<OCaml<'c, RetT>, OCaml<'c, OCamlException>>where
arg1: OCamlParam<'a, 'b, Rust1, OCaml1>,
arg2: OCamlParam<'a, 'b, Rust2, OCaml2>,
pub fn try_call<'a, 'b: 'a, arg1, arg2, Rust1, Rust2>(
&self,
cr: &'c mut OCamlRuntime,
arg1: arg1,
arg2: arg2
) -> Result<OCaml<'c, RetT>, OCaml<'c, OCamlException>>where
arg1: OCamlParam<'a, 'b, Rust1, OCaml1>,
arg2: OCamlParam<'a, 'b, Rust2, OCaml2>,
Calls the OCaml closure, converting the arguments to OCaml if necessary
source§impl<'c, OCaml1, OCaml2, OCaml3, RetT> BoxRoot<fn(_: OCaml1, _: OCaml2, _: OCaml3) -> RetT>
impl<'c, OCaml1, OCaml2, OCaml3, RetT> BoxRoot<fn(_: OCaml1, _: OCaml2, _: OCaml3) -> RetT>
sourcepub fn try_call<'a, 'b: 'a, arg1, arg2, arg3, Rust1, Rust2, Rust3>(
&self,
cr: &'c mut OCamlRuntime,
arg1: arg1,
arg2: arg2,
arg3: arg3
) -> Result<OCaml<'c, RetT>, OCaml<'c, OCamlException>>where
arg1: OCamlParam<'a, 'b, Rust1, OCaml1>,
arg2: OCamlParam<'a, 'b, Rust2, OCaml2>,
arg3: OCamlParam<'a, 'b, Rust3, OCaml3>,
pub fn try_call<'a, 'b: 'a, arg1, arg2, arg3, Rust1, Rust2, Rust3>(
&self,
cr: &'c mut OCamlRuntime,
arg1: arg1,
arg2: arg2,
arg3: arg3
) -> Result<OCaml<'c, RetT>, OCaml<'c, OCamlException>>where
arg1: OCamlParam<'a, 'b, Rust1, OCaml1>,
arg2: OCamlParam<'a, 'b, Rust2, OCaml2>,
arg3: OCamlParam<'a, 'b, Rust3, OCaml3>,
Calls the OCaml closure, converting the arguments to OCaml if necessary
source§impl<'c, OCaml1, OCaml2, OCaml3, OCaml4, RetT> BoxRoot<fn(_: OCaml1, _: OCaml2, _: OCaml3, _: OCaml4) -> RetT>
impl<'c, OCaml1, OCaml2, OCaml3, OCaml4, RetT> BoxRoot<fn(_: OCaml1, _: OCaml2, _: OCaml3, _: OCaml4) -> RetT>
sourcepub fn try_call<'a, 'b: 'a, arg1, arg2, arg3, arg4, Rust1, Rust2, Rust3, Rust4>(
&self,
cr: &'c mut OCamlRuntime,
arg1: arg1,
arg2: arg2,
arg3: arg3,
arg4: arg4
) -> Result<OCaml<'c, RetT>, OCaml<'c, OCamlException>>where
arg1: OCamlParam<'a, 'b, Rust1, OCaml1>,
arg2: OCamlParam<'a, 'b, Rust2, OCaml2>,
arg3: OCamlParam<'a, 'b, Rust3, OCaml3>,
arg4: OCamlParam<'a, 'b, Rust4, OCaml4>,
pub fn try_call<'a, 'b: 'a, arg1, arg2, arg3, arg4, Rust1, Rust2, Rust3, Rust4>(
&self,
cr: &'c mut OCamlRuntime,
arg1: arg1,
arg2: arg2,
arg3: arg3,
arg4: arg4
) -> Result<OCaml<'c, RetT>, OCaml<'c, OCamlException>>where
arg1: OCamlParam<'a, 'b, Rust1, OCaml1>,
arg2: OCamlParam<'a, 'b, Rust2, OCaml2>,
arg3: OCamlParam<'a, 'b, Rust3, OCaml3>,
arg4: OCamlParam<'a, 'b, Rust4, OCaml4>,
Calls the OCaml closure, converting the arguments to OCaml if necessary
source§impl<'c, OCaml1, OCaml2, OCaml3, OCaml4, OCaml5, RetT> BoxRoot<fn(_: OCaml1, _: OCaml2, _: OCaml3, _: OCaml4, _: OCaml5) -> RetT>
impl<'c, OCaml1, OCaml2, OCaml3, OCaml4, OCaml5, RetT> BoxRoot<fn(_: OCaml1, _: OCaml2, _: OCaml3, _: OCaml4, _: OCaml5) -> RetT>
sourcepub fn try_call<'a, 'b: 'a, arg1, arg2, arg3, arg4, arg5, Rust1, Rust2, Rust3, Rust4, Rust5>(
&self,
cr: &'c mut OCamlRuntime,
arg1: arg1,
arg2: arg2,
arg3: arg3,
arg4: arg4,
arg5: arg5
) -> Result<OCaml<'c, RetT>, OCaml<'c, OCamlException>>where
arg1: OCamlParam<'a, 'b, Rust1, OCaml1>,
arg2: OCamlParam<'a, 'b, Rust2, OCaml2>,
arg3: OCamlParam<'a, 'b, Rust3, OCaml3>,
arg4: OCamlParam<'a, 'b, Rust4, OCaml4>,
arg5: OCamlParam<'a, 'b, Rust5, OCaml5>,
pub fn try_call<'a, 'b: 'a, arg1, arg2, arg3, arg4, arg5, Rust1, Rust2, Rust3, Rust4, Rust5>(
&self,
cr: &'c mut OCamlRuntime,
arg1: arg1,
arg2: arg2,
arg3: arg3,
arg4: arg4,
arg5: arg5
) -> Result<OCaml<'c, RetT>, OCaml<'c, OCamlException>>where
arg1: OCamlParam<'a, 'b, Rust1, OCaml1>,
arg2: OCamlParam<'a, 'b, Rust2, OCaml2>,
arg3: OCamlParam<'a, 'b, Rust3, OCaml3>,
arg4: OCamlParam<'a, 'b, Rust4, OCaml4>,
arg5: OCamlParam<'a, 'b, Rust5, OCaml5>,
Calls the OCaml closure, converting the arguments to OCaml if necessary
source§impl<'c, OCaml1, OCaml2, OCaml3, OCaml4, OCaml5, OCaml6, RetT> BoxRoot<fn(_: OCaml1, _: OCaml2, _: OCaml3, _: OCaml4, _: OCaml5, _: OCaml6) -> RetT>
impl<'c, OCaml1, OCaml2, OCaml3, OCaml4, OCaml5, OCaml6, RetT> BoxRoot<fn(_: OCaml1, _: OCaml2, _: OCaml3, _: OCaml4, _: OCaml5, _: OCaml6) -> RetT>
sourcepub fn try_call<'a, 'b: 'a, arg1, arg2, arg3, arg4, arg5, arg6, Rust1, Rust2, Rust3, Rust4, Rust5, Rust6>(
&self,
cr: &'c mut OCamlRuntime,
arg1: arg1,
arg2: arg2,
arg3: arg3,
arg4: arg4,
arg5: arg5,
arg6: arg6
) -> Result<OCaml<'c, RetT>, OCaml<'c, OCamlException>>where
arg1: OCamlParam<'a, 'b, Rust1, OCaml1>,
arg2: OCamlParam<'a, 'b, Rust2, OCaml2>,
arg3: OCamlParam<'a, 'b, Rust3, OCaml3>,
arg4: OCamlParam<'a, 'b, Rust4, OCaml4>,
arg5: OCamlParam<'a, 'b, Rust5, OCaml5>,
arg6: OCamlParam<'a, 'b, Rust6, OCaml6>,
pub fn try_call<'a, 'b: 'a, arg1, arg2, arg3, arg4, arg5, arg6, Rust1, Rust2, Rust3, Rust4, Rust5, Rust6>(
&self,
cr: &'c mut OCamlRuntime,
arg1: arg1,
arg2: arg2,
arg3: arg3,
arg4: arg4,
arg5: arg5,
arg6: arg6
) -> Result<OCaml<'c, RetT>, OCaml<'c, OCamlException>>where
arg1: OCamlParam<'a, 'b, Rust1, OCaml1>,
arg2: OCamlParam<'a, 'b, Rust2, OCaml2>,
arg3: OCamlParam<'a, 'b, Rust3, OCaml3>,
arg4: OCamlParam<'a, 'b, Rust4, OCaml4>,
arg5: OCamlParam<'a, 'b, Rust5, OCaml5>,
arg6: OCamlParam<'a, 'b, Rust6, OCaml6>,
Calls the OCaml closure, converting the arguments to OCaml if necessary
source§impl<'c, OCaml1, OCaml2, OCaml3, OCaml4, OCaml5, OCaml6, OCaml7, RetT> BoxRoot<fn(_: OCaml1, _: OCaml2, _: OCaml3, _: OCaml4, _: OCaml5, _: OCaml6, _: OCaml7) -> RetT>
impl<'c, OCaml1, OCaml2, OCaml3, OCaml4, OCaml5, OCaml6, OCaml7, RetT> BoxRoot<fn(_: OCaml1, _: OCaml2, _: OCaml3, _: OCaml4, _: OCaml5, _: OCaml6, _: OCaml7) -> RetT>
sourcepub fn try_call<'a, 'b: 'a, arg1, arg2, arg3, arg4, arg5, arg6, arg7, Rust1, Rust2, Rust3, Rust4, Rust5, Rust6, Rust7>(
&self,
cr: &'c mut OCamlRuntime,
arg1: arg1,
arg2: arg2,
arg3: arg3,
arg4: arg4,
arg5: arg5,
arg6: arg6,
arg7: arg7
) -> Result<OCaml<'c, RetT>, OCaml<'c, OCamlException>>where
arg1: OCamlParam<'a, 'b, Rust1, OCaml1>,
arg2: OCamlParam<'a, 'b, Rust2, OCaml2>,
arg3: OCamlParam<'a, 'b, Rust3, OCaml3>,
arg4: OCamlParam<'a, 'b, Rust4, OCaml4>,
arg5: OCamlParam<'a, 'b, Rust5, OCaml5>,
arg6: OCamlParam<'a, 'b, Rust6, OCaml6>,
arg7: OCamlParam<'a, 'b, Rust7, OCaml7>,
pub fn try_call<'a, 'b: 'a, arg1, arg2, arg3, arg4, arg5, arg6, arg7, Rust1, Rust2, Rust3, Rust4, Rust5, Rust6, Rust7>(
&self,
cr: &'c mut OCamlRuntime,
arg1: arg1,
arg2: arg2,
arg3: arg3,
arg4: arg4,
arg5: arg5,
arg6: arg6,
arg7: arg7
) -> Result<OCaml<'c, RetT>, OCaml<'c, OCamlException>>where
arg1: OCamlParam<'a, 'b, Rust1, OCaml1>,
arg2: OCamlParam<'a, 'b, Rust2, OCaml2>,
arg3: OCamlParam<'a, 'b, Rust3, OCaml3>,
arg4: OCamlParam<'a, 'b, Rust4, OCaml4>,
arg5: OCamlParam<'a, 'b, Rust5, OCaml5>,
arg6: OCamlParam<'a, 'b, Rust6, OCaml6>,
arg7: OCamlParam<'a, 'b, Rust7, OCaml7>,
Calls the OCaml closure, converting the arguments to OCaml if necessary
Trait Implementations§
source§impl<T> ToOCaml<T> for BoxRoot<T>
impl<T> ToOCaml<T> for BoxRoot<T>
source§fn to_ocaml<'a>(&self, cr: &'a mut OCamlRuntime) -> OCaml<'a, T>
fn to_ocaml<'a>(&self, cr: &'a mut OCamlRuntime) -> OCaml<'a, T>
Convert to OCaml value.
source§fn to_boxroot(&self, cr: &mut OCamlRuntime) -> BoxRoot<T>
fn to_boxroot(&self, cr: &mut OCamlRuntime) -> BoxRoot<T>
Convert to OCaml value. Return an already rooted value as
BoxRoot
<T>
.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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more