Struct ocaml::Pointer [−][src]
#[repr(transparent)]pub struct Pointer<'a, T>(pub Value, _);Expand description
A handle to a Rust value/reference owned by the OCaml heap.
This should only be used with values allocated with alloc_final or alloc_custom,
for abstract pointers see Value::alloc_abstract_ptr and Value::abstract_ptr_val
Tuple Fields
0: ValueImplementations
Allocate a new value with an optional custom finalizer and used/max
This calls caml_alloc_final under-the-hood, which can has less than ideal performance
behavior. In most cases you should prefer Poiner::alloc_custom when possible.
Allocate a Custom value
Drop pointer in place
Safety
This should only be used when you’re in control of the underlying value and want to drop it. It should only be called once.
Access the underlying mutable pointer
Trait Implementations
Convert from OCaml value
Convert to OCaml value
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for Pointer<'a, T> where
T: RefUnwindSafe,
impl<'a, T> UnwindSafe for Pointer<'a, T> where
T: RefUnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more