1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// Copyright (c) Viable Systems and TezEdge Contributors
// SPDX-License-Identifier: MIT
use crate::*;
use PhantomData;
pub use ;
pub unsafe
pub unsafe
/// [`OCaml`]`<OCamlList<T>>` is a reference to an OCaml `list` containing
/// values of type `T`.
/// [`OCaml`]`<OCamlUniformArray<T>>` is a reference to an OCaml array which is
/// guaranteed to not contain unboxed floats. If OCaml was configured with
/// `--disable-flat-float-array` this corresponds to regular `array`s, but if
/// not, `Uniform_array.t` in the `base` library can be used instead.
/// See [Lexifi's blog post on the topic](https://www.lexifi.com/blog/ocaml/about-unboxed-float-arrays/)
/// for more details.
/// [`OCaml`]`<OCamlFloatArray<T>>` is a reference to an OCaml `floatarray`
/// which is an array containing `float`s in an unboxed form.
/// `OCaml<DynBox<T>>` is for passing a value of type `T` to OCaml
///
/// To box a Rust value, use [`OCaml::box_value`][crate::OCaml::box_value].
///
/// **Experimental**
/// [`OCaml`]`<OCamlBytes>` is a reference to an OCaml `bytes` value.
///
/// # Note
///
/// Unlike with [`OCaml`]`<String>`, there is no validation being performed when converting this
/// value into `String`.
/// [`OCaml`]`<OCamlInt>` is an OCaml integer (tagged and unboxed) value.
pub type OCamlInt = Intnat;
/// [`OCaml`]`<OCamlInt32>` is a reference to an OCaml `Int32.t` (boxed `int32`) value.
/// [`OCaml`]`<OCamlInt64>` is a reference to an OCaml `Int64.t` (boxed `int64`) value.
/// [`OCaml`]`<OCamlFloat>` is a reference to an OCaml `float` (boxed `float`) value.
/// [`OCaml`]`<OCamlException>` is a reference to an OCaml `exn` value.